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:
@ -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();
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user