1
0
mirror of https://github.com/VCMP-SqMod/SqMod.git synced 2025-06-19 16:47:14 +02:00

Implement a new event to receive notifications when a vehicle tyre status has changed.

This commit is contained in:
Sandu Liviu Catalin
2016-08-18 14:56:38 +03:00
parent 23948b5903
commit 05443ba2d4
6 changed files with 38 additions and 6 deletions

View File

@ -257,6 +257,7 @@ void Core::ResetFunc(VehicleInst & inst)
inst.mOnWorld.ReleaseGently();
inst.mOnImmunity.ReleaseGently();
inst.mOnPartStatus.ReleaseGently();
inst.mOnTyreStatus.ReleaseGently();
}
// ------------------------------------------------------------------------------------------------
@ -370,6 +371,7 @@ void Core::ResetFunc()
Core::Get().mOnVehicleWorld.ReleaseGently();
Core::Get().mOnVehicleImmunity.ReleaseGently();
Core::Get().mOnVehiclePartStatus.ReleaseGently();
Core::Get().mOnVehicleTyreStatus.ReleaseGently();
Core::Get().mOnServerOption.ReleaseGently();
Core::Get().mOnScriptReload.ReleaseGently();
Core::Get().mOnScriptLoaded.ReleaseGently();
@ -488,6 +490,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_SERVEROPTION: return mOnServerOption;
case EVT_SCRIPTRELOAD: return mOnScriptReload;
case EVT_SCRIPTLOADED: return mOnScriptLoaded;
@ -673,6 +676,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;
default: return NullFunction();
}
}