summaryrefslogtreecommitdiffstats
path: root/src/modelinfo/ModelInfo.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/modelinfo/ModelInfo.cpp')
-rw-r--r--src/modelinfo/ModelInfo.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/modelinfo/ModelInfo.cpp b/src/modelinfo/ModelInfo.cpp
index ca36aa61..acc40824 100644
--- a/src/modelinfo/ModelInfo.cpp
+++ b/src/modelinfo/ModelInfo.cpp
@@ -168,6 +168,13 @@ CModelInfo::GetModelInfo(const char *name, int *id)
return nil;
}
+bool
+CModelInfo::IsBoatModel(int32 id)
+{
+ return GetModelInfo(id)->m_type == MITYPE_VEHICLE &&
+ ((CVehicleModelInfo*)GetModelInfo(id))->m_vehicleType == VEHICLE_TYPE_BOAT;
+}
+
STARTPATCHES
InjectHook(0x50B310, CModelInfo::Initialise, PATCH_JUMP);
InjectHook(0x50B5B0, CModelInfo::ShutDown, PATCH_JUMP);