From 3f26250d73d5c196a66262821a7980ccdbd8deed Mon Sep 17 00:00:00 2001 From: Nikolay Korolev Date: Sat, 6 Jun 2020 13:31:09 +0300 Subject: fixing some uninitialized stuff --- src/vehicles/Plane.cpp | 4 ++++ src/vehicles/Train.cpp | 4 ++++ src/vehicles/Vehicle.cpp | 3 +++ 3 files changed, 11 insertions(+) (limited to 'src/vehicles') diff --git a/src/vehicles/Plane.cpp b/src/vehicles/Plane.cpp index 71189d84..3bf385a0 100644 --- a/src/vehicles/Plane.cpp +++ b/src/vehicles/Plane.cpp @@ -84,6 +84,10 @@ CPlane::CPlane(int32 id, uint8 CreatedBy) SetStatus(STATUS_PLANE); bIsBIGBuilding = true; m_level = LEVEL_NONE; + +#ifdef FIX_BUGS + m_isFarAway = true; +#endif } CPlane::~CPlane() diff --git a/src/vehicles/Train.cpp b/src/vehicles/Train.cpp index 38bb1300..baf6bfb7 100644 --- a/src/vehicles/Train.cpp +++ b/src/vehicles/Train.cpp @@ -63,6 +63,10 @@ CTrain::CTrain(int32 id, uint8 CreatedBy) bUsesCollision = true; SetStatus(STATUS_TRAIN_MOVING); + +#ifdef FIX_BUGS + m_isFarAway = true; +#endif } void diff --git a/src/vehicles/Vehicle.cpp b/src/vehicles/Vehicle.cpp index dbb15b5d..addbfc3d 100644 --- a/src/vehicles/Vehicle.cpp +++ b/src/vehicles/Vehicle.cpp @@ -59,6 +59,9 @@ CVehicle::CVehicle(uint8 CreatedBy) bIsLawEnforcer = false; bIsAmbulanceOnDuty = false; bIsFireTruckOnDuty = false; +#ifdef FIX_BUGS + bIsHandbrakeOn = false; +#endif CCarCtrl::UpdateCarCount(this, false); m_fHealth = 1000.0f; bEngineOn = true; -- cgit v1.2.3