summaryrefslogtreecommitdiffstats
path: root/src/modelinfo
diff options
context:
space:
mode:
authorNikolay Korolev <nickvnuk@gmail.com>2020-05-08 22:29:43 +0200
committerNikolay Korolev <nickvnuk@gmail.com>2020-05-08 22:29:43 +0200
commit7e753c259680a13c656bdc6c86d99a4891616474 (patch)
tree7cc9674c62784eba25109dee499bd73056a4e62f /src/modelinfo
parentfix (diff)
downloadre3-7e753c259680a13c656bdc6c86d99a4891616474.tar
re3-7e753c259680a13c656bdc6c86d99a4891616474.tar.gz
re3-7e753c259680a13c656bdc6c86d99a4891616474.tar.bz2
re3-7e753c259680a13c656bdc6c86d99a4891616474.tar.lz
re3-7e753c259680a13c656bdc6c86d99a4891616474.tar.xz
re3-7e753c259680a13c656bdc6c86d99a4891616474.tar.zst
re3-7e753c259680a13c656bdc6c86d99a4891616474.zip
Diffstat (limited to 'src/modelinfo')
-rw-r--r--src/modelinfo/ModelInfo.cpp7
-rw-r--r--src/modelinfo/ModelInfo.h1
2 files changed, 8 insertions, 0 deletions
diff --git a/src/modelinfo/ModelInfo.cpp b/src/modelinfo/ModelInfo.cpp
index 79353b1b..29466777 100644
--- a/src/modelinfo/ModelInfo.cpp
+++ b/src/modelinfo/ModelInfo.cpp
@@ -199,6 +199,13 @@ CModelInfo::IsBikeModel(int32 id)
((CVehicleModelInfo*)GetModelInfo(id))->m_vehicleType == VEHICLE_TYPE_BIKE;
}
+bool
+CModelInfo::IsCarModel(int32 id)
+{
+ return GetModelInfo(id)->GetModelType() == MITYPE_VEHICLE &&
+ ((CVehicleModelInfo*)GetModelInfo(id))->m_vehicleType == VEHICLE_TYPE_CAR;
+}
+
void
CModelInfo::ReInit2dEffects()
{
diff --git a/src/modelinfo/ModelInfo.h b/src/modelinfo/ModelInfo.h
index 46f8c117..fd545e3d 100644
--- a/src/modelinfo/ModelInfo.h
+++ b/src/modelinfo/ModelInfo.h
@@ -39,5 +39,6 @@ public:
static bool IsBoatModel(int32 id);
static bool IsBikeModel(int32 id);
+ static bool IsCarModel(int32 id);
static void ReInit2dEffects();
};