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 damage data has changed.

This commit is contained in:
Sandu Liviu Catalin
2016-08-18 15:06:03 +03:00
parent 05443ba2d4
commit 69325ed2cc
6 changed files with 36 additions and 4 deletions

View File

@ -258,6 +258,7 @@ void Core::ResetFunc(VehicleInst & inst)
inst.mOnImmunity.ReleaseGently();
inst.mOnPartStatus.ReleaseGently();
inst.mOnTyreStatus.ReleaseGently();
inst.mOnDamageData.ReleaseGently();
}
// ------------------------------------------------------------------------------------------------
@ -372,6 +373,7 @@ void Core::ResetFunc()
Core::Get().mOnVehicleImmunity.ReleaseGently();
Core::Get().mOnVehiclePartStatus.ReleaseGently();
Core::Get().mOnVehicleTyreStatus.ReleaseGently();
Core::Get().mOnVehicleDamageData.ReleaseGently();
Core::Get().mOnServerOption.ReleaseGently();
Core::Get().mOnScriptReload.ReleaseGently();
Core::Get().mOnScriptLoaded.ReleaseGently();
@ -491,6 +493,7 @@ Function & Core::GetEvent(Int32 evid)
case EVT_VEHICLEIMMUNITY: return mOnVehicleImmunity;
case EVT_VEHICLEPARTSTATUS: return mOnVehiclePartStatus;
case EVT_VEHICLETYRESTATUS: return mOnVehicleTyreStatus;
case EVT_VEHICLEDAMAGEDATA: return mOnVehicleDamageData;
case EVT_SERVEROPTION: return mOnServerOption;
case EVT_SCRIPTRELOAD: return mOnScriptReload;
case EVT_SCRIPTLOADED: return mOnScriptLoaded;
@ -677,6 +680,7 @@ Function & Core::GetVehicleEvent(Int32 id, Int32 evid)
case EVT_VEHICLEIMMUNITY: return inst.mOnImmunity;
case EVT_VEHICLEPARTSTATUS: return inst.mOnPartStatus;
case EVT_VEHICLETYRESTATUS: return inst.mOnTyreStatus;
case EVT_VEHICLEDAMAGEDATA: return inst.mOnDamageData;
default: return NullFunction();
}
}