mirror of
https://github.com/VCMP-SqMod/SqMod.git
synced 2024-11-08 08:47:17 +01:00
Fix a spelling mistake in event names.
This commit is contained in:
parent
a35b127871
commit
ce7aed075c
@ -156,7 +156,7 @@ static const EnumElement g_EventEnum[] = {
|
||||
{_SC("VehicleWorld"), EVT_VEHICLEWORLD},
|
||||
{_SC("VehicleImmunity"), EVT_VEHICLEIMMUNITY},
|
||||
{_SC("VehiclePartStatus"), EVT_VEHICLEPARTSTATUS},
|
||||
{_SC("VehicleTyreStatus"), EVT_VEHICLETYRESTATUS},
|
||||
{_SC("VehicleTireStatus"), EVT_VEHICLETIRESTATUS},
|
||||
{_SC("VehicleDamageData"), EVT_VEHICLEDAMAGEDATA},
|
||||
{_SC("VehicleRadio"), EVT_VEHICLERADIO},
|
||||
{_SC("VehicleHandlingRule"), EVT_VEHICLEHANDLINGRULE},
|
||||
|
@ -507,7 +507,7 @@ protected:
|
||||
Function mOnWorld;
|
||||
Function mOnImmunity;
|
||||
Function mOnPartStatus;
|
||||
Function mOnTyreStatus;
|
||||
Function mOnTireStatus;
|
||||
Function mOnDamageData;
|
||||
Function mOnRadio;
|
||||
Function mOnHandlingRule;
|
||||
@ -1049,7 +1049,7 @@ public:
|
||||
void EmitVehicleWorld(Int32 vehicle_id, Int32 old_world, Int32 new_world);
|
||||
void EmitVehicleImmunity(Int32 vehicle_id, Int32 old_immunity, Int32 new_immunity);
|
||||
void EmitVehiclePartStatus(Int32 vehicle_id, Int32 part, Int32 old_status, Int32 new_status);
|
||||
void EmitVehicleTyreStatus(Int32 vehicle_id, Int32 tyre, Int32 old_status, Int32 new_status);
|
||||
void EmitVehicleTireStatus(Int32 vehicle_id, Int32 tire, Int32 old_status, Int32 new_status);
|
||||
void EmitVehicleDamageData(Int32 vehicle_id, Uint32 old_data, Uint32 new_data);
|
||||
void EmitVehicleRadio(Int32 vehicle_id, Int32 old_radio, Int32 new_radio);
|
||||
void EmitVehicleHandlingRule(Int32 vehicle_id, Int32 rule, Float32 old_data, Float32 new_data);
|
||||
@ -1211,7 +1211,7 @@ private:
|
||||
Function mOnVehicleWorld;
|
||||
Function mOnVehicleImmunity;
|
||||
Function mOnVehiclePartStatus;
|
||||
Function mOnVehicleTyreStatus;
|
||||
Function mOnVehicleTireStatus;
|
||||
Function mOnVehicleDamageData;
|
||||
Function mOnVehicleRadio;
|
||||
Function mOnVehicleHandlingRule;
|
||||
|
@ -935,11 +935,11 @@ void Core::EmitVehiclePartStatus(Int32 vehicle_id, Int32 part, Int32 old_status,
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
void Core::EmitVehicleTyreStatus(Int32 vehicle_id, Int32 tyre, Int32 old_status, Int32 new_status)
|
||||
void Core::EmitVehicleTireStatus(Int32 vehicle_id, Int32 tire, Int32 old_status, Int32 new_status)
|
||||
{
|
||||
VehicleInst & _vehicle = m_Vehicles.at(vehicle_id);
|
||||
Emit(_vehicle.mOnTyreStatus, tyre, old_status, new_status);
|
||||
Emit(mOnVehicleTyreStatus, _vehicle.mObj, tyre, old_status, new_status);
|
||||
Emit(_vehicle.mOnTireStatus, tire, old_status, new_status);
|
||||
Emit(mOnVehicleTireStatus, _vehicle.mObj, tire, old_status, new_status);
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
|
@ -266,7 +266,7 @@ void Core::ResetFunc(VehicleInst & inst)
|
||||
inst.mOnWorld.ReleaseGently();
|
||||
inst.mOnImmunity.ReleaseGently();
|
||||
inst.mOnPartStatus.ReleaseGently();
|
||||
inst.mOnTyreStatus.ReleaseGently();
|
||||
inst.mOnTireStatus.ReleaseGently();
|
||||
inst.mOnDamageData.ReleaseGently();
|
||||
inst.mOnRadio.ReleaseGently();
|
||||
inst.mOnHandlingRule.ReleaseGently();
|
||||
@ -392,7 +392,7 @@ void Core::ResetFunc()
|
||||
Core::Get().mOnVehicleWorld.ReleaseGently();
|
||||
Core::Get().mOnVehicleImmunity.ReleaseGently();
|
||||
Core::Get().mOnVehiclePartStatus.ReleaseGently();
|
||||
Core::Get().mOnVehicleTyreStatus.ReleaseGently();
|
||||
Core::Get().mOnVehicleTireStatus.ReleaseGently();
|
||||
Core::Get().mOnVehicleDamageData.ReleaseGently();
|
||||
Core::Get().mOnVehicleRadio.ReleaseGently();
|
||||
Core::Get().mOnVehicleHandlingRule.ReleaseGently();
|
||||
@ -523,7 +523,7 @@ Function & Core::GetEvent(Int32 evid)
|
||||
case EVT_VEHICLEWORLD: return mOnVehicleWorld;
|
||||
case EVT_VEHICLEIMMUNITY: return mOnVehicleImmunity;
|
||||
case EVT_VEHICLEPARTSTATUS: return mOnVehiclePartStatus;
|
||||
case EVT_VEHICLETYRESTATUS: return mOnVehicleTyreStatus;
|
||||
case EVT_VEHICLETIRESTATUS: return mOnVehicleTireStatus;
|
||||
case EVT_VEHICLEDAMAGEDATA: return mOnVehicleDamageData;
|
||||
case EVT_VEHICLERADIO: return mOnVehicleRadio;
|
||||
case EVT_VEHICLEHANDLINGRULE: return mOnVehicleHandlingRule;
|
||||
@ -721,7 +721,7 @@ Function & Core::GetVehicleEvent(Int32 id, Int32 evid)
|
||||
case EVT_VEHICLEWORLD: return inst.mOnWorld;
|
||||
case EVT_VEHICLEIMMUNITY: return inst.mOnImmunity;
|
||||
case EVT_VEHICLEPARTSTATUS: return inst.mOnPartStatus;
|
||||
case EVT_VEHICLETYRESTATUS: return inst.mOnTyreStatus;
|
||||
case EVT_VEHICLETIRESTATUS: return inst.mOnTireStatus;
|
||||
case EVT_VEHICLEDAMAGEDATA: return inst.mOnDamageData;
|
||||
case EVT_VEHICLERADIO: return inst.mOnRadio;
|
||||
case EVT_VEHICLEHANDLINGRULE: return inst.mOnHandlingRule;
|
||||
|
@ -889,35 +889,35 @@ void CVehicle::SetPartStatus(Int32 part, Int32 status)
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
Int32 CVehicle::GetTyreStatus(Int32 tyre) const
|
||||
Int32 CVehicle::GetTireStatus(Int32 tire) const
|
||||
{
|
||||
// Validate the managed identifier
|
||||
Validate();
|
||||
// Return the requested information
|
||||
return _Func->GetVehicleTyreStatus(m_ID, tyre);
|
||||
return _Func->GetVehicleTireStatus(m_ID, tire);
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
void CVehicle::SetTyreStatus(Int32 tyre, Int32 status)
|
||||
void CVehicle::SetTireStatus(Int32 tire, Int32 status)
|
||||
{
|
||||
// Validate the managed identifier
|
||||
Validate();
|
||||
// Grab the current value for this property
|
||||
const Int32 current = _Func->GetVehicleTyreStatus(m_ID, tyre);
|
||||
const Int32 current = _Func->GetVehicleTireStatus(m_ID, tire);
|
||||
// Don't even bother if it's the same value
|
||||
if (current == status)
|
||||
{
|
||||
return;
|
||||
}
|
||||
// Avoid property unwind from a recursive call
|
||||
_Func->SetVehicleTyreStatus(m_ID, tyre, status);
|
||||
_Func->SetVehicleTireStatus(m_ID, tire, status);
|
||||
// Avoid infinite recursive event loops
|
||||
if (!(m_CircularLocks & VEHICLECL_EMIT_VEHICLE_TYRESTATUS))
|
||||
if (!(m_CircularLocks & VEHICLECL_EMIT_VEHICLE_TIRESTATUS))
|
||||
{
|
||||
// Prevent this event from triggering while executed
|
||||
BitGuardU32 bg(m_CircularLocks, VEHICLECL_EMIT_VEHICLE_TYRESTATUS);
|
||||
BitGuardU32 bg(m_CircularLocks, VEHICLECL_EMIT_VEHICLE_TIRESTATUS);
|
||||
// Now forward the event call
|
||||
Core::Get().EmitVehicleTyreStatus(m_ID, tyre, current, status);
|
||||
Core::Get().EmitVehicleTireStatus(m_ID, tire, 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("GetTyreStatus"), &CVehicle::GetTyreStatus)
|
||||
.Func(_SC("SetTyreStatus"), &CVehicle::SetTyreStatus)
|
||||
.Func(_SC("GetTireStatus"), &CVehicle::GetTireStatus)
|
||||
.Func(_SC("SetTireStatus"), &CVehicle::SetTireStatus)
|
||||
.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_TYRESTATUS = (5 << 0),
|
||||
VEHICLECL_EMIT_VEHICLE_TIRESTATUS = (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 tyre status of the managed vehicle entity.
|
||||
* Retrieve the tire status of the managed vehicle entity.
|
||||
*/
|
||||
Int32 GetTyreStatus(Int32 tyre) const;
|
||||
Int32 GetTireStatus(Int32 tire) const;
|
||||
|
||||
/* --------------------------------------------------------------------------------------------
|
||||
* Modify the tyre status of the managed vehicle entity.
|
||||
* Modify the tire status of the managed vehicle entity.
|
||||
*/
|
||||
void SetTyreStatus(Int32 tyre, Int32 status);
|
||||
void SetTireStatus(Int32 tire, Int32 status);
|
||||
|
||||
/* --------------------------------------------------------------------------------------------
|
||||
* Retrieve the damage data of the managed vehicle entity.
|
||||
|
@ -402,7 +402,7 @@ enum EventType
|
||||
EVT_VEHICLEWORLD,
|
||||
EVT_VEHICLEIMMUNITY,
|
||||
EVT_VEHICLEPARTSTATUS,
|
||||
EVT_VEHICLETYRESTATUS,
|
||||
EVT_VEHICLETIRESTATUS,
|
||||
EVT_VEHICLEDAMAGEDATA,
|
||||
EVT_VEHICLERADIO,
|
||||
EVT_VEHICLEHANDLINGRULE,
|
||||
|
Loading…
Reference in New Issue
Block a user