Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion addons/sourcemod/scripting/include/movementapi.inc
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -745,4 +753,4 @@ public void __pl_movementapi_SetNTVOptional()
MarkNativeAsOptional("Movement_GetCollisionEndOrigin");
MarkNativeAsOptional("Movement_GetCollisionNormal");
}
#endif
#endif
3 changes: 3 additions & 0 deletions addons/sourcemod/scripting/movementapi/forwards.sp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}


Expand Down
Loading