| 1253 | //=========================================================================== |
| 1254 | |
| 1255 | static 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 | // |