From 253d3f8fe9c5ec2f7878716d22aec4fc77356386 Mon Sep 17 00:00:00 2001 From: Dots Date: Mon, 27 Apr 2026 00:45:44 +0300 Subject: [PATCH 1/2] readd removed native and change --- addons/sourcemod/scripting/include/movementapi.inc | 8 ++++++++ addons/sourcemod/scripting/movementapi/forwards.sp | 3 +++ 2 files changed, 11 insertions(+) diff --git a/addons/sourcemod/scripting/include/movementapi.inc b/addons/sourcemod/scripting/include/movementapi.inc index 59b167a..8bf0109 100644 --- a/addons/sourcemod/scripting/include/movementapi.inc +++ b/addons/sourcemod/scripting/include/movementapi.inc @@ -516,6 +516,14 @@ native void Movement_SetTakeoffVelocity(int client, float velocity[3]); */ native void Movement_SetLandingOrigin(int client, float origin[3]); +/** + * Set the player's landing velocity. + * + * @param client Client index. + * @param origin Desired velocity. + */ +native void Movement_SetLandingVelocity(int client, float velocity[3]); + /** * Get the player's number of collisions during movement processing. * This function should ideally be called after inside Movement_OnTryPlayerMovePost. diff --git a/addons/sourcemod/scripting/movementapi/forwards.sp b/addons/sourcemod/scripting/movementapi/forwards.sp index bc96b00..d3132be 100644 --- a/addons/sourcemod/scripting/movementapi/forwards.sp +++ b/addons/sourcemod/scripting/movementapi/forwards.sp @@ -92,6 +92,9 @@ void Call_OnStopTouchGround(int client, bool jumped, bool ladderJump, bool jumpb Call_PushCell(ladderJump); Call_PushCell(jumpbug); Call_Finish(); + + // Immediately update OldOnGround state, so we can catch takeoffs that happen outside movement processing. + gB_OldOnGround[client] = false; } From 7c8401c9d65f877733fb936e3860d9ff80cf6504 Mon Sep 17 00:00:00 2001 From: Juniper Date: Mon, 27 Apr 2026 01:06:05 +0300 Subject: [PATCH 2/2] Fix parameter name in Movement_SetLandingVelocity Signed-off-by: Juniper --- addons/sourcemod/scripting/include/movementapi.inc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/sourcemod/scripting/include/movementapi.inc b/addons/sourcemod/scripting/include/movementapi.inc index 8bf0109..46b20dd 100644 --- a/addons/sourcemod/scripting/include/movementapi.inc +++ b/addons/sourcemod/scripting/include/movementapi.inc @@ -520,7 +520,7 @@ native void Movement_SetLandingOrigin(int client, float origin[3]); * Set the player's landing velocity. * * @param client Client index. - * @param origin Desired velocity. + * @param velocity Desired velocity. */ native void Movement_SetLandingVelocity(int client, float velocity[3]); @@ -753,4 +753,4 @@ public void __pl_movementapi_SetNTVOptional() MarkNativeAsOptional("Movement_GetCollisionEndOrigin"); MarkNativeAsOptional("Movement_GetCollisionNormal"); } -#endif \ No newline at end of file +#endif