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

This commit is contained in:
Sandu Liviu Catalin
2016-08-18 15:13:33 +03:00
parent 69325ed2cc
commit db522913d3
6 changed files with 35 additions and 4 deletions

View File

@ -259,6 +259,7 @@ void Core::ResetFunc(VehicleInst & inst)
inst.mOnPartStatus.ReleaseGently();
inst.mOnTyreStatus.ReleaseGently();
inst.mOnDamageData.ReleaseGently();
inst.mOnRadio.ReleaseGently();
}
// ------------------------------------------------------------------------------------------------
@ -374,6 +375,7 @@ void Core::ResetFunc()
Core::Get().mOnVehiclePartStatus.ReleaseGently();
Core::Get().mOnVehicleTyreStatus.ReleaseGently();
Core::Get().mOnVehicleDamageData.ReleaseGently();
Core::Get().mOnVehicleRadio.ReleaseGently();
Core::Get().mOnServerOption.ReleaseGently();
Core::Get().mOnScriptReload.ReleaseGently();
Core::Get().mOnScriptLoaded.ReleaseGently();
@ -494,6 +496,7 @@ Function & Core::GetEvent(Int32 evid)
case EVT_VEHICLEPARTSTATUS: return mOnVehiclePartStatus;
case EVT_VEHICLETYRESTATUS: return mOnVehicleTyreStatus;
case EVT_VEHICLEDAMAGEDATA: return mOnVehicleDamageData;
case EVT_VEHICLERADIO: return mOnVehicleRadio;
case EVT_SERVEROPTION: return mOnServerOption;
case EVT_SCRIPTRELOAD: return mOnScriptReload;
case EVT_SCRIPTLOADED: return mOnScriptLoaded;
@ -681,6 +684,7 @@ Function & Core::GetVehicleEvent(Int32 id, Int32 evid)
case EVT_VEHICLEPARTSTATUS: return inst.mOnPartStatus;
case EVT_VEHICLETYRESTATUS: return inst.mOnTyreStatus;
case EVT_VEHICLEDAMAGEDATA: return inst.mOnDamageData;
case EVT_VEHICLERADIO: return inst.mOnRadio;
default: return NullFunction();
}
}