mirror of
https://github.com/VCMP-SqMod/SqMod.git
synced 2025-06-16 07:07:13 +02:00
Undo changes from previous commit. As it turns out this is just another conflict between Brits and Americans. A conflict which makes everything warn about a spelling mistake when it's not the case.
This commit is contained in:
@ -889,35 +889,35 @@ void CVehicle::SetPartStatus(Int32 part, Int32 status)
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
Int32 CVehicle::GetTireStatus(Int32 tire) const
|
||||
Int32 CVehicle::GetTyreStatus(Int32 tyre) const
|
||||
{
|
||||
// Validate the managed identifier
|
||||
Validate();
|
||||
// Return the requested information
|
||||
return _Func->GetVehicleTireStatus(m_ID, tire);
|
||||
return _Func->GetVehicleTyreStatus(m_ID, tyre);
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
void CVehicle::SetTireStatus(Int32 tire, Int32 status)
|
||||
void CVehicle::SetTyreStatus(Int32 tyre, Int32 status)
|
||||
{
|
||||
// Validate the managed identifier
|
||||
Validate();
|
||||
// Grab the current value for this property
|
||||
const Int32 current = _Func->GetVehicleTireStatus(m_ID, tire);
|
||||
const Int32 current = _Func->GetVehicleTyreStatus(m_ID, tyre);
|
||||
// Don't even bother if it's the same value
|
||||
if (current == status)
|
||||
{
|
||||
return;
|
||||
}
|
||||
// Avoid property unwind from a recursive call
|
||||
_Func->SetVehicleTireStatus(m_ID, tire, status);
|
||||
_Func->SetVehicleTyreStatus(m_ID, tyre, status);
|
||||
// Avoid infinite recursive event loops
|
||||
if (!(m_CircularLocks & VEHICLECL_EMIT_VEHICLE_TIRESTATUS))
|
||||
if (!(m_CircularLocks & VEHICLECL_EMIT_VEHICLE_TYRESTATUS))
|
||||
{
|
||||
// Prevent this event from triggering while executed
|
||||
BitGuardU32 bg(m_CircularLocks, VEHICLECL_EMIT_VEHICLE_TIRESTATUS);
|
||||
BitGuardU32 bg(m_CircularLocks, VEHICLECL_EMIT_VEHICLE_TYRESTATUS);
|
||||
// Now forward the event call
|
||||
Core::Get().EmitVehicleTireStatus(m_ID, tire, current, status);
|
||||
Core::Get().EmitVehicleTyreStatus(m_ID, tyre, current, status);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1876,8 +1876,8 @@ void Register_CVehicle(HSQUIRRELVM vm)
|
||||
.Func(_SC("SetColors"), &CVehicle::SetColors)
|
||||
.Func(_SC("GetPartStatus"), &CVehicle::GetPartStatus)
|
||||
.Func(_SC("SetPartStatus"), &CVehicle::SetPartStatus)
|
||||
.Func(_SC("GetTireStatus"), &CVehicle::GetTireStatus)
|
||||
.Func(_SC("SetTireStatus"), &CVehicle::SetTireStatus)
|
||||
.Func(_SC("GetTyreStatus"), &CVehicle::GetTyreStatus)
|
||||
.Func(_SC("SetTyreStatus"), &CVehicle::SetTyreStatus)
|
||||
.Func(_SC("ExistsHandlingRule"), &CVehicle::ExistsHandlingRule)
|
||||
.Func(_SC("GetHandlingRule"), &CVehicle::GetHandlingRule)
|
||||
.Func(_SC("SetHandlingRule"), &CVehicle::SetHandlingRule)
|
||||
|
@ -16,7 +16,7 @@ enum VehicleCircularLocks
|
||||
VEHICLECL_EMIT_VEHICLE_WORLD = (2 << 0),
|
||||
VEHICLECL_EMIT_VEHICLE_IMMUNITY = (3 << 0),
|
||||
VEHICLECL_EMIT_VEHICLE_PARTSTATUS = (4 << 0),
|
||||
VEHICLECL_EMIT_VEHICLE_TIRESTATUS = (5 << 0),
|
||||
VEHICLECL_EMIT_VEHICLE_TYRESTATUS = (5 << 0),
|
||||
VEHICLECL_EMIT_VEHICLE_DAMAGEDATA = (6 << 0),
|
||||
VEHICLECL_EMIT_VEHICLE_RADIO = (7 << 0),
|
||||
VEHICLECL_EMIT_VEHICLE_HANDLINGRULE = (8 << 0)
|
||||
@ -538,14 +538,14 @@ public:
|
||||
void SetPartStatus(Int32 part, Int32 status);
|
||||
|
||||
/* --------------------------------------------------------------------------------------------
|
||||
* Retrieve the tire status of the managed vehicle entity.
|
||||
* Retrieve the tyre status of the managed vehicle entity.
|
||||
*/
|
||||
Int32 GetTireStatus(Int32 tire) const;
|
||||
Int32 GetTyreStatus(Int32 tyre) const;
|
||||
|
||||
/* --------------------------------------------------------------------------------------------
|
||||
* Modify the tire status of the managed vehicle entity.
|
||||
* Modify the tyre status of the managed vehicle entity.
|
||||
*/
|
||||
void SetTireStatus(Int32 tire, Int32 status);
|
||||
void SetTyreStatus(Int32 tyre, Int32 status);
|
||||
|
||||
/* --------------------------------------------------------------------------------------------
|
||||
* Retrieve the damage data of the managed vehicle entity.
|
||||
|
Reference in New Issue
Block a user