diff options
author | aap <aap@papnet.eu> | 2019-06-27 10:58:51 +0200 |
---|---|---|
committer | aap <aap@papnet.eu> | 2019-06-27 10:58:51 +0200 |
commit | d74b8fa9521b070ba09496563904a5e4b994edf2 (patch) | |
tree | 21d37d89d193bffa20ac2fcbbbf20d63408cd247 /src/modelinfo | |
parent | Merge pull request #61 from gennariarmando/master (diff) | |
download | re3-d74b8fa9521b070ba09496563904a5e4b994edf2.tar re3-d74b8fa9521b070ba09496563904a5e4b994edf2.tar.gz re3-d74b8fa9521b070ba09496563904a5e4b994edf2.tar.bz2 re3-d74b8fa9521b070ba09496563904a5e4b994edf2.tar.lz re3-d74b8fa9521b070ba09496563904a5e4b994edf2.tar.xz re3-d74b8fa9521b070ba09496563904a5e4b994edf2.tar.zst re3-d74b8fa9521b070ba09496563904a5e4b994edf2.zip |
Diffstat (limited to 'src/modelinfo')
-rw-r--r-- | src/modelinfo/ModelInfo.cpp | 7 | ||||
-rw-r--r-- | src/modelinfo/ModelInfo.h | 2 |
2 files changed, 9 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); diff --git a/src/modelinfo/ModelInfo.h b/src/modelinfo/ModelInfo.h index 4ab633bf..30be96ca 100644 --- a/src/modelinfo/ModelInfo.h +++ b/src/modelinfo/ModelInfo.h @@ -34,4 +34,6 @@ public: static CBaseModelInfo *GetModelInfo(int id){ return ms_modelInfoPtrs[id]; } + + static bool IsBoatModel(int32 id); }; |