From 06addf326f155b05f63acec78b816406a3aaaad5 Mon Sep 17 00:00:00 2001 From: KiD Fearless Date: Mon, 23 Nov 2020 13:56:30 -0700 Subject: [PATCH] Implement the ProcessMovment forwards --- addons/sourcemod/scripting/include/shavit.inc | 16 ++++++++++++++++ addons/sourcemod/scripting/shavit-core.sp | 2 +- 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/addons/sourcemod/scripting/include/shavit.inc b/addons/sourcemod/scripting/include/shavit.inc index 4f651c49..35fb43b6 100644 --- a/addons/sourcemod/scripting/include/shavit.inc +++ b/addons/sourcemod/scripting/include/shavit.inc @@ -895,6 +895,22 @@ forward Action Shavit_OnCheckpointMenuSelect(int client, int param2, char[] info */ forward Action Shavit_OnPlaySound(int client, char[] sound, int maxlength, int[] clients, int &count); +/** + * Called before the server & timer handle the ProcessMovement method. + * + * @param client Client Index. + * @noreturn + */ +forward void Shavit_OnProcessMovement(int client); + +/** + * Called After the server handles the ProcessMovement method, but before the timer handles the method. + * + * @param client Client Index. + * @noreturn + */ +forward void Shavit_OnProcessMovementPost(int client); + /** * Returns the game type the server is running. * diff --git a/addons/sourcemod/scripting/shavit-core.sp b/addons/sourcemod/scripting/shavit-core.sp index 7392e2da..fe5ad31b 100644 --- a/addons/sourcemod/scripting/shavit-core.sp +++ b/addons/sourcemod/scripting/shavit-core.sp @@ -266,7 +266,7 @@ public void OnPluginStart() gH_Forwards_OnTimescaleChanged = CreateGlobalForward("Shavit_OnTimescaleChanged", ET_Event, Param_Cell, Param_Cell, Param_Cell); gH_Forwards_OnTimeOffsetCalculated = CreateGlobalForward("Shavit_OnTimeOffsetCalculated", ET_Event, Param_Cell, Param_Cell, Param_Cell, Param_Cell); gH_Forwards_OnProcessMovement = CreateGlobalForward("Shavit_OnProcessMovement", ET_Event, Param_Cell); - gH_Forwards_OnProcessMovementPost = CreateGlobalForward("Shavit_OnProcessMovementPre", ET_Event, Param_Cell); + gH_Forwards_OnProcessMovementPost = CreateGlobalForward("Shavit_OnProcessMovementPost", ET_Event, Param_Cell); LoadTranslations("shavit-core.phrases"); LoadTranslations("shavit-common.phrases");