summaryrefslogtreecommitdiffstats
path: root/src/control
diff options
context:
space:
mode:
authorSergeanur <s.anureev@yandex.ua>2020-05-05 14:06:55 +0200
committerSergeanur <s.anureev@yandex.ua>2020-05-05 14:06:55 +0200
commit4cc1bb92e74eaabe9d5ef3d20fb658d577699fa9 (patch)
tree2f970e7b4fc457d3312b8ee3fef2d0de72f6fff8 /src/control
parentMore use of GetModelIndex (diff)
downloadre3-4cc1bb92e74eaabe9d5ef3d20fb658d577699fa9.tar
re3-4cc1bb92e74eaabe9d5ef3d20fb658d577699fa9.tar.gz
re3-4cc1bb92e74eaabe9d5ef3d20fb658d577699fa9.tar.bz2
re3-4cc1bb92e74eaabe9d5ef3d20fb658d577699fa9.tar.lz
re3-4cc1bb92e74eaabe9d5ef3d20fb658d577699fa9.tar.xz
re3-4cc1bb92e74eaabe9d5ef3d20fb658d577699fa9.tar.zst
re3-4cc1bb92e74eaabe9d5ef3d20fb658d577699fa9.zip
Diffstat (limited to '')
-rw-r--r--src/control/SceneEdit.cpp5
-rw-r--r--src/control/Script.cpp2
2 files changed, 3 insertions, 4 deletions
diff --git a/src/control/SceneEdit.cpp b/src/control/SceneEdit.cpp
index cf6cc4f6..c8b4242e 100644
--- a/src/control/SceneEdit.cpp
+++ b/src/control/SceneEdit.cpp
@@ -84,12 +84,11 @@ static int32 NextValidModelId(int32 mi, int32 step)
CVehicleModelInfo* pVehicleInfo = (CVehicleModelInfo*)pInfo;
if (!pInfo)
continue;
- if (pInfo->m_type == MITYPE_PED
+ if (pInfo->GetModelType() == MITYPE_PED
#ifdef FIX_BUGS
&& !(i >= MI_SPECIAL01 && i <= MI_SPECIAL04)
#endif
- ||
- pInfo->m_type == MITYPE_VEHICLE &&
+ || pInfo->GetModelType() == MITYPE_VEHICLE &&
#ifdef FIX_BUGS
(pVehicleInfo->m_vehicleType == VEHICLE_TYPE_CAR || pVehicleInfo->m_vehicleType == VEHICLE_TYPE_BOAT))
#else // && and || priority failure it seems, also crashes on special models
diff --git a/src/control/Script.cpp b/src/control/Script.cpp
index 7906b3e7..2bb945d3 100644
--- a/src/control/Script.cpp
+++ b/src/control/Script.cpp
@@ -8074,7 +8074,7 @@ int8 CRunningScript::ProcessCommands900To999(int32 command)
continue;
// desperatly want to believe this was inlined :|
CBaseModelInfo* pInfo = CModelInfo::GetModelInfo(model);
- assert(pInfo->m_type == MITYPE_VEHICLE);
+ assert(pInfo->GetModelType() == MITYPE_VEHICLE);
CVehicleModelInfo* pVehicleInfo = (CVehicleModelInfo*)pInfo;
if (pVehicleInfo->m_vehicleType != VEHICLE_TYPE_CAR) {
switch (model) {