diff options
Diffstat (limited to 'src/modelinfo')
-rw-r--r-- | src/modelinfo/ModelIndices.h | 23 | ||||
-rw-r--r-- | src/modelinfo/ModelInfo.cpp | 7 | ||||
-rw-r--r-- | src/modelinfo/ModelInfo.h | 1 | ||||
-rw-r--r-- | src/modelinfo/PedModelInfo.cpp | 20 | ||||
-rw-r--r-- | src/modelinfo/PedModelInfo.h | 4 |
5 files changed, 43 insertions, 12 deletions
diff --git a/src/modelinfo/ModelIndices.h b/src/modelinfo/ModelIndices.h index 0d9ffb53..a0d3f70c 100644 --- a/src/modelinfo/ModelIndices.h +++ b/src/modelinfo/ModelIndices.h @@ -315,6 +315,11 @@ enum MI_TOYZ, MI_GHOST, + // leftovers on PC + MI_MIAMI_RCBARON = 154, + MI_MIAMI_RCRAIDER = 155, + MI_MIAMI_SPARROW = 159, + MI_GRENADE = 170, MI_AK47, MI_BASEBALL_BAT, @@ -465,3 +470,21 @@ IsPickupModel(int16 id) id == MI_PICKUP_KILLFRENZY || id == MI_PICKUP_CAMERA; } + +inline bool +IsPolicePedModel(int16 id) +{ + return id == MI_COP || + id == MI_SWAT || + id == MI_FBI || + id == MI_ARMY; +} + +inline bool +IsPoliceVehicleModel(int16 id) +{ + return id == MI_CHOPPER || + id == MI_PREDATOR || + id == MI_POLICE || + id == MI_ENFORCER; +} diff --git a/src/modelinfo/ModelInfo.cpp b/src/modelinfo/ModelInfo.cpp index 454a73f1..0c3ec76a 100644 --- a/src/modelinfo/ModelInfo.cpp +++ b/src/modelinfo/ModelInfo.cpp @@ -175,6 +175,13 @@ CModelInfo::IsBoatModel(int32 id) ((CVehicleModelInfo*)GetModelInfo(id))->m_vehicleType == VEHICLE_TYPE_BOAT; } +bool +CModelInfo::IsBikeModel(int32 id) +{ + return GetModelInfo(id)->m_type == MITYPE_VEHICLE && + ((CVehicleModelInfo*)GetModelInfo(id))->m_vehicleType == VEHICLE_TYPE_BIKE; +} + void CModelInfo::RemoveColModelsFromOtherLevels(eLevelName level) { diff --git a/src/modelinfo/ModelInfo.h b/src/modelinfo/ModelInfo.h index d20367d1..ee82276d 100644 --- a/src/modelinfo/ModelInfo.h +++ b/src/modelinfo/ModelInfo.h @@ -36,5 +36,6 @@ public: } static bool IsBoatModel(int32 id); + static bool IsBikeModel(int32 id); static void RemoveColModelsFromOtherLevels(eLevelName level); }; diff --git a/src/modelinfo/PedModelInfo.cpp b/src/modelinfo/PedModelInfo.cpp index 747cbc99..c5242ef6 100644 --- a/src/modelinfo/PedModelInfo.cpp +++ b/src/modelinfo/PedModelInfo.cpp @@ -1,5 +1,6 @@ #include "common.h" #include "patcher.h" +#include "Ped.h" #include "NodeName.h" #include "VisibilityPlugins.h" #include "ModelInfo.h" @@ -14,7 +15,7 @@ CPedModelInfo::DeleteRwObject(void) } RwObjectNameIdAssocation CPedModelInfo::m_pPedIds[12] = { - { "Smid", PED_TORSO, 0, }, // that is strange... + { "Smid", PED_MID, 0, }, // that is strange... { "Shead", PED_HEAD, 0, }, { "Supperarml", PED_UPPERARML, 0, }, { "Supperarmr", PED_UPPERARMR, 0, }, @@ -109,17 +110,16 @@ struct ColNodeInfo float radius; }; -// TODO: find out piece types #define NUMPEDINFONODES 8 ColNodeInfo m_pColNodeInfos[NUMPEDINFONODES] = { - { nil, PED_HEAD, 6, 0.0f, 0.05f, 0.2f }, - { "Storso", 0, 0, 0.0f, 0.15f, 0.2f }, - { "Storso", 0, 0, 0.0f, -0.05f, 0.3f }, - { nil, PED_TORSO, 1, 0.0f, -0.07f, 0.3f }, - { nil, PED_UPPERARML, 2, 0.07f, -0.1f, 0.2f }, - { nil, PED_UPPERARMR, 3, -0.07f, -0.1f, 0.2f }, - { "Slowerlegl", 0, 4, 0.0f, 0.07f, 0.25f }, - { nil, PED_LOWERLEGR, 5, 0.0f, 0.07f, 0.25f }, + { nil, PED_HEAD, PEDPIECE_HEAD, 0.0f, 0.05f, 0.2f }, + { "Storso", 0, PEDPIECE_TORSO, 0.0f, 0.15f, 0.2f }, + { "Storso", 0, PEDPIECE_TORSO, 0.0f, -0.05f, 0.3f }, + { nil, PED_MID, PEDPIECE_MID, 0.0f, -0.07f, 0.3f }, + { nil, PED_UPPERARML, PEDPIECE_LEFTARM, 0.07f, -0.1f, 0.2f }, + { nil, PED_UPPERARMR, PEDPIECE_RIGHTARM, -0.07f, -0.1f, 0.2f }, + { "Slowerlegl", 0, PEDPIECE_LEFTLEG, 0.0f, 0.07f, 0.25f }, + { nil, PED_LOWERLEGR, PEDPIECE_RIGHTLEG, 0.0f, 0.07f, 0.25f }, }; RwObject* diff --git a/src/modelinfo/PedModelInfo.h b/src/modelinfo/PedModelInfo.h index bec46b4e..483d13f8 100644 --- a/src/modelinfo/PedModelInfo.h +++ b/src/modelinfo/PedModelInfo.h @@ -3,8 +3,8 @@ #include "ClumpModelInfo.h" enum PedNode { - PED_WAIST, - PED_TORSO, // Smid on PS2/PC, Storso on mobile/xbox + PED_TORSO, + PED_MID, // Smid on PS2/PC, Storso on mobile/xbox PED_HEAD, PED_UPPERARML, PED_UPPERARMR, |