MCPcopy Create free account
hub / github.com/ZDoom/Raze / parseDefineModel

Function parseDefineModel

source/core/defparser.cpp:1255–1276  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1253//===========================================================================
1254
1255static void parseDefineModel(FScanner& sc, FScriptPosition& pos)
1256{
1257 FString modelfn;
1258 double scale;
1259 int shadeoffs;
1260
1261 if (!sc.GetString(modelfn)) return;
1262 if (!sc.GetFloat(scale, true)) return;
1263 if (!sc.GetNumber(shadeoffs, true)) return;
1264
1265 mdglobal.lastmodelid = modelManager.LoadModel(modelfn.GetChars());
1266 if (mdglobal.lastmodelid < 0)
1267 {
1268 pos.Message(MSG_WARNING, "definemodel: unable to load model file '%s'", modelfn.GetChars());
1269 }
1270 else
1271 {
1272 modelManager.SetMisc(mdglobal.lastmodelid, (float)scale, shadeoffs, 0.0, 0.0, 0);
1273 mdglobal.modelskin = mdglobal.lastmodelskin = 0;
1274 mdglobal.seenframe = 0;
1275 }
1276}
1277
1278//===========================================================================
1279//

Callers

nothing calls this directly

Calls 7

LoadModelMethod · 0.80
MessageMethod · 0.80
SetMiscMethod · 0.80
GetStringMethod · 0.45
GetFloatMethod · 0.45
GetNumberMethod · 0.45
GetCharsMethod · 0.45

Tested by

no test coverage detected