From be1c7b0761c2de0362a47ecfff616a8931b54805 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?eray=20or=C3=A7unus?= Date: Sat, 10 Aug 2019 18:15:22 +0300 Subject: P.e.d.s. and fixes --- src/vehicles/Automobile.h | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) (limited to 'src/vehicles') diff --git a/src/vehicles/Automobile.h b/src/vehicles/Automobile.h index e6b64e6e..4dd3a087 100644 --- a/src/vehicles/Automobile.h +++ b/src/vehicles/Automobile.h @@ -58,6 +58,14 @@ enum eBombType CARBOMB_ONIGNITIONACTIVE, }; +enum { + CAR_DOOR_FLAG_UNKNOWN = 0x0, + CAR_DOOR_FLAG_LF = 0x1, + CAR_DOOR_FLAG_LR = 0x2, + CAR_DOOR_FLAG_RF = 0x4, + CAR_DOOR_FLAG_RR = 0x8 +}; + class CAutomobile : public CVehicle { public: @@ -189,14 +197,14 @@ static_assert(sizeof(CAutomobile) == 0x5A8, "CAutomobile: error"); inline uint8 GetCarDoorFlag(int32 carnode) { switch (carnode) { case CAR_DOOR_LF: - return 1; + return CAR_DOOR_FLAG_LF; case CAR_DOOR_LR: - return 2; + return CAR_DOOR_FLAG_LR; case CAR_DOOR_RF: - return 4; + return CAR_DOOR_FLAG_RF; case CAR_DOOR_RR: - return 8; + return CAR_DOOR_FLAG_RR; default: - return 0; + return CAR_DOOR_FLAG_UNKNOWN; } } -- cgit v1.2.3