Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consistency: Use uppercase for LockState enum values #96

Merged
merged 1 commit into from
Feb 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions code/client/src/core/hooks/vehicle.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ bool C_CarActionEnter__TestActionInternal(void *pThis, SDK::C_Actor *actor, bool

// TODO: check for seat occupancy status

return carData->lockState == MafiaMP::Shared::Modules::VehicleSync::LockState::Unlocked;
return carData->lockState == MafiaMP::Shared::Modules::VehicleSync::LockState::UNLOCKED;
}

typedef bool(__fastcall *C_CarActionBreakIn__TestActionInternal_t)(void *, SDK::C_Actor *, bool);
Expand All @@ -59,7 +59,7 @@ bool C_CarActionBreakIn__TestActionInternal(void *pThis, SDK::C_Actor *actor, bo

// TODO: check for seat occupancy status

return carData->lockState == MafiaMP::Shared::Modules::VehicleSync::LockState::Breakable;
return carData->lockState == MafiaMP::Shared::Modules::VehicleSync::LockState::BREAKABLE;
}

typedef bool(__fastcall *C_CarActionLeave__TestAction_t)(void *, SDK::C_Actor *);
Expand All @@ -75,7 +75,7 @@ bool C_CarActionLeave__TestAction(void *pThis, SDK::C_Actor *actor) {
if (!carData) {
return true;
}
return carData->lockState == MafiaMP::Shared::Modules::VehicleSync::LockState::Unlocked;
return carData->lockState == MafiaMP::Shared::Modules::VehicleSync::LockState::UNLOCKED;
}

typedef bool(__fastcall *C_CarActionBailOut__TestAction_t)(void *, SDK::C_Actor *);
Expand All @@ -91,7 +91,7 @@ bool C_CarActionBailOut__TestAction(void *pThis, SDK::C_Actor *pActor) {
if (!carData) {
return true;
}
return carData->lockState == MafiaMP::Shared::Modules::VehicleSync::LockState::Unlocked;
return carData->lockState == MafiaMP::Shared::Modules::VehicleSync::LockState::UNLOCKED;
}

bool C_CarActionOpenCloseX__TestAction(void *pThis, SDK::C_Actor *actor) {
Expand All @@ -105,7 +105,7 @@ bool C_CarActionOpenCloseX__TestAction(void *pThis, SDK::C_Actor *actor) {
if (!carData) {
return true;
}
return carData->lockState == MafiaMP::Shared::Modules::VehicleSync::LockState::Unlocked;
return carData->lockState == MafiaMP::Shared::Modules::VehicleSync::LockState::UNLOCKED;
}

typedef void(__fastcall *C_Human2CarWrapper__StartDrive_t)(SDK::C_Human2CarWrapper *, SDK::C_Actor *, bool);
Expand Down
8 changes: 4 additions & 4 deletions code/shared/modules/vehicle_sync.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@
namespace MafiaMP::Shared::Modules {
struct VehicleSync {
enum class LockState {
Unlocked,
Locked,
Breakable,
UNLOCKED,
LOCKED,
BREAKABLE,
};

struct UpdateData {
Expand All @@ -26,7 +26,7 @@ namespace MafiaMP::Shared::Modules {
float handbrake = 0.0f;
bool hornOn = false;
char licensePlate[7] = "AZ-000";
LockState lockState = LockState::Unlocked;
LockState lockState = LockState::UNLOCKED;
float power = 0.0f;
bool radioOn = false;
int radioStationId = 0;
Expand Down
Loading