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 part status has changed.

This commit is contained in:
Sandu Liviu Catalin
2016-08-18 14:51:55 +03:00
parent 732769aff2
commit 23948b5903
6 changed files with 37 additions and 5 deletions

View File

@ -256,6 +256,7 @@ void Core::ResetFunc(VehicleInst & inst)
inst.mOnOption.ReleaseGently();
inst.mOnWorld.ReleaseGently();
inst.mOnImmunity.ReleaseGently();
inst.mOnPartStatus.ReleaseGently();
}
// ------------------------------------------------------------------------------------------------
@ -368,6 +369,7 @@ void Core::ResetFunc()
Core::Get().mOnVehicleOption.ReleaseGently();
Core::Get().mOnVehicleWorld.ReleaseGently();
Core::Get().mOnVehicleImmunity.ReleaseGently();
Core::Get().mOnVehiclePartStatus.ReleaseGently();
Core::Get().mOnServerOption.ReleaseGently();
Core::Get().mOnScriptReload.ReleaseGently();
Core::Get().mOnScriptLoaded.ReleaseGently();
@ -485,6 +487,7 @@ Function & Core::GetEvent(Int32 evid)
case EVT_VEHICLEOPTION: return mOnVehicleOption;
case EVT_VEHICLEWORLD: return mOnVehicleWorld;
case EVT_VEHICLEIMMUNITY: return mOnVehicleImmunity;
case EVT_VEHICLEPARTSTATUS: return mOnVehiclePartStatus;
case EVT_SERVEROPTION: return mOnServerOption;
case EVT_SCRIPTRELOAD: return mOnScriptReload;
case EVT_SCRIPTLOADED: return mOnScriptLoaded;
@ -669,6 +672,7 @@ Function & Core::GetVehicleEvent(Int32 id, Int32 evid)
case EVT_VEHICLEOPTION: return inst.mOnOption;
case EVT_VEHICLEWORLD: return inst.mOnWorld;
case EVT_VEHICLEIMMUNITY: return inst.mOnImmunity;
case EVT_VEHICLEPARTSTATUS: return inst.mOnPartStatus;
default: return NullFunction();
}
}