summaryrefslogtreecommitdiffstats
path: root/src/vehicles
diff options
context:
space:
mode:
authoreray orçunus <erayorcunus@gmail.com>2020-10-04 21:39:54 +0200
committereray orçunus <erayorcunus@gmail.com>2020-10-08 16:58:18 +0200
commitfec01aeff1daa891d754bd249f053652788d6f8e (patch)
treea66e4fb54a910961732c41f93436e284b8b3ac0c /src/vehicles
parentCdStreamPosix: fix type issues (diff)
downloadre3-fec01aeff1daa891d754bd249f053652788d6f8e.tar
re3-fec01aeff1daa891d754bd249f053652788d6f8e.tar.gz
re3-fec01aeff1daa891d754bd249f053652788d6f8e.tar.bz2
re3-fec01aeff1daa891d754bd249f053652788d6f8e.tar.lz
re3-fec01aeff1daa891d754bd249f053652788d6f8e.tar.xz
re3-fec01aeff1daa891d754bd249f053652788d6f8e.tar.zst
re3-fec01aeff1daa891d754bd249f053652788d6f8e.zip
Diffstat (limited to 'src/vehicles')
-rw-r--r--src/vehicles/CarGen.cpp9
-rw-r--r--src/vehicles/Vehicle.h2
2 files changed, 8 insertions, 3 deletions
diff --git a/src/vehicles/CarGen.cpp b/src/vehicles/CarGen.cpp
index b0fa91a4..598b8342 100644
--- a/src/vehicles/CarGen.cpp
+++ b/src/vehicles/CarGen.cpp
@@ -28,8 +28,13 @@ uint32 CTheCarGenerators::CurrentActiveCount;
void CCarGenerator::SwitchOff()
{
- m_nUsesRemaining = 0;
- --CTheCarGenerators::CurrentActiveCount;
+#ifdef FIX_BUGS
+ if (m_nUsesRemaining != 0)
+#endif
+ {
+ m_nUsesRemaining = 0;
+ --CTheCarGenerators::CurrentActiveCount;
+ }
}
void CCarGenerator::SwitchOn()
diff --git a/src/vehicles/Vehicle.h b/src/vehicles/Vehicle.h
index 6bd6f7c6..ae969921 100644
--- a/src/vehicles/Vehicle.h
+++ b/src/vehicles/Vehicle.h
@@ -187,7 +187,7 @@ public:
CAutoPilot AutoPilot;
uint8 m_currentColour1;
uint8 m_currentColour2;
- uint8 m_aExtras[2];
+ int8 m_aExtras[2];
int16 m_nAlarmState;
int16 m_nRouteSeed;
CPed *pDriver;