diff --git a/addons/sourcemod/scripting/include/movementapi.inc b/addons/sourcemod/scripting/include/movementapi.inc index 59b167a..46b20dd 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 velocity 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. @@ -745,4 +753,4 @@ public void __pl_movementapi_SetNTVOptional() MarkNativeAsOptional("Movement_GetCollisionEndOrigin"); MarkNativeAsOptional("Movement_GetCollisionNormal"); } -#endif \ No newline at end of file +#endif 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; }