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 immunity has changed.

This commit is contained in:
Sandu Liviu Catalin
2016-08-18 14:45:12 +03:00
parent ebc168e558
commit 732769aff2
6 changed files with 31 additions and 4 deletions

View File

@ -255,6 +255,7 @@ void Core::ResetFunc(VehicleInst & inst)
inst.mOnRotation.ReleaseGently();
inst.mOnOption.ReleaseGently();
inst.mOnWorld.ReleaseGently();
inst.mOnImmunity.ReleaseGently();
}
// ------------------------------------------------------------------------------------------------
@ -366,6 +367,7 @@ void Core::ResetFunc()
Core::Get().mOnVehicleRotation.ReleaseGently();
Core::Get().mOnVehicleOption.ReleaseGently();
Core::Get().mOnVehicleWorld.ReleaseGently();
Core::Get().mOnVehicleImmunity.ReleaseGently();
Core::Get().mOnServerOption.ReleaseGently();
Core::Get().mOnScriptReload.ReleaseGently();
Core::Get().mOnScriptLoaded.ReleaseGently();
@ -482,6 +484,7 @@ Function & Core::GetEvent(Int32 evid)
case EVT_VEHICLEROTATION: return mOnVehicleRotation;
case EVT_VEHICLEOPTION: return mOnVehicleOption;
case EVT_VEHICLEWORLD: return mOnVehicleWorld;
case EVT_VEHICLEIMMUNITY: return mOnVehicleImmunity;
case EVT_SERVEROPTION: return mOnServerOption;
case EVT_SCRIPTRELOAD: return mOnScriptReload;
case EVT_SCRIPTLOADED: return mOnScriptLoaded;
@ -665,6 +668,7 @@ Function & Core::GetVehicleEvent(Int32 id, Int32 evid)
case EVT_VEHICLEROTATION: return inst.mOnRotation;
case EVT_VEHICLEOPTION: return inst.mOnOption;
case EVT_VEHICLEWORLD: return inst.mOnWorld;
case EVT_VEHICLEIMMUNITY: return inst.mOnImmunity;
default: return NullFunction();
}
}