summaryrefslogtreecommitdiffstats
path: root/src/control/Garages.h
diff options
context:
space:
mode:
authorNikolay Korolev <nickvnuk@gmail.com>2020-03-30 23:01:03 +0200
committerNikolay Korolev <nickvnuk@gmail.com>2020-03-30 23:01:03 +0200
commit50b43b680e34f42e33fc29ddbdb060b9c2266de2 (patch)
tree8eb5dc8ca398fdf60f65dea0b2c9a2cf174e557d /src/control/Garages.h
parentMerge branch 'master' into garages_dev (diff)
downloadre3-50b43b680e34f42e33fc29ddbdb060b9c2266de2.tar
re3-50b43b680e34f42e33fc29ddbdb060b9c2266de2.tar.gz
re3-50b43b680e34f42e33fc29ddbdb060b9c2266de2.tar.bz2
re3-50b43b680e34f42e33fc29ddbdb060b9c2266de2.tar.lz
re3-50b43b680e34f42e33fc29ddbdb060b9c2266de2.tar.xz
re3-50b43b680e34f42e33fc29ddbdb060b9c2266de2.tar.zst
re3-50b43b680e34f42e33fc29ddbdb060b9c2266de2.zip
Diffstat (limited to 'src/control/Garages.h')
-rw-r--r--src/control/Garages.h15
1 files changed, 7 insertions, 8 deletions
diff --git a/src/control/Garages.h b/src/control/Garages.h
index ffe24e3a..5d1063ca 100644
--- a/src/control/Garages.h
+++ b/src/control/Garages.h
@@ -67,6 +67,8 @@ class CStoredCar
int8 m_nCarBombType;
public:
void Init() { m_nModelIndex = 0; }
+ void Clear() { m_nModelIndex = 0; }
+ bool HasCar() { return m_nModelIndex != 0; }
CStoredCar(const CStoredCar& other);
void StoreCar(CVehicle*);
CVehicle* RestoreCar();
@@ -81,7 +83,7 @@ class CGarage
public:
eGarageType m_eGarageType;
eGarageState m_eGarageState;
- char field_2;
+ bool field_2;
bool m_bClosingWithoutTargetCar;
bool m_bDeactivated;
bool m_bResprayHappened;
@@ -110,13 +112,10 @@ public:
float m_fDoor1Z;
float m_fDoor2Z;
uint32 m_nTimeToStartAction;
- char m_bCollectedCarsState;
- char field_89;
- char field_90;
- char field_91;
+ uint8 m_bCollectedCarsState;
CVehicle *m_pTarget;
- int field_96;
- CStoredCar m_sStoredCar;
+ void* field_96;
+ CStoredCar m_sStoredCar; // not needed
void OpenThisGarage();
void CloseThisGarage();
@@ -126,7 +125,7 @@ public:
void Update();
float GetGarageCenterX() { return (m_fX1 + m_fX2) / 2; }
float GetGarageCenterY() { return (m_fY1 + m_fY2) / 2; }
- bool IsClose()
+ bool IsFar()
{
#ifdef FIX_BUGS
return Abs(TheCamera.GetPosition().x - GetGarageCenterX()) > SWITCH_GARAGE_DISTANCE_CLOSE ||