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 checkpoint world has changed.

This commit is contained in:
Sandu Liviu Catalin
2016-08-18 15:54:26 +03:00
parent fee9b66750
commit f38aa16b5f
6 changed files with 48 additions and 4 deletions

View File

@ -132,6 +132,7 @@ void Core::ResetFunc(CheckpointInst & inst)
inst.mOnCustom.ReleaseGently();
inst.mOnEntered.ReleaseGently();
inst.mOnExited.ReleaseGently();
inst.mOnWorld.ReleaseGently();
}
// ------------------------------------------------------------------------------------------------
@ -347,6 +348,7 @@ void Core::ResetFunc()
Core::Get().mOnPickupRespawn.ReleaseGently();
Core::Get().mOnCheckpointEntered.ReleaseGently();
Core::Get().mOnCheckpointExited.ReleaseGently();
Core::Get().mOnCheckpointWorld.ReleaseGently();
Core::Get().mOnEntityPool.ReleaseGently();
Core::Get().mOnClientScriptData.ReleaseGently();
Core::Get().mOnPlayerUpdate.ReleaseGently();
@ -469,6 +471,7 @@ Function & Core::GetEvent(Int32 evid)
case EVT_PICKUPRESPAWN: return mOnPickupRespawn;
case EVT_CHECKPOINTENTERED: return mOnCheckpointEntered;
case EVT_CHECKPOINTEXITED: return mOnCheckpointExited;
case EVT_CHECKPOINTWORLD: return mOnCheckpointWorld;
case EVT_ENTITYPOOL: return mOnEntityPool;
case EVT_CLIENTSCRIPTDATA: return mOnClientScriptData;
case EVT_PLAYERUPDATE: return mOnPlayerUpdate;
@ -531,6 +534,7 @@ Function & Core::GetCheckpointEvent(Int32 id, Int32 evid)
case EVT_CHECKPOINTCUSTOM: return inst.mOnCustom;
case EVT_CHECKPOINTENTERED: return inst.mOnEntered;
case EVT_CHECKPOINTEXITED: return inst.mOnExited;
case EVT_CHECKPOINTWORLD: return inst.mOnWorld;
default: return NullFunction();
}
}