Skip to content

Commit

Permalink
Merge pull request #480 from zer0k-z/jumpstats-bettertracking
Browse files Browse the repository at this point in the history
Only track jump during movement processing
  • Loading branch information
zealain authored Apr 19, 2024
2 parents bb97fa7 + c9e4e5c commit 8fdf554
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 8 deletions.
5 changes: 3 additions & 2 deletions addons/sourcemod/scripting/gokz-jumpstats.sp
Original file line number Diff line number Diff line change
Expand Up @@ -112,9 +112,10 @@ public Action OnPlayerRunCmd(int client, int &buttons, int &impulse, float vel[3
return Plugin_Continue;
}

public void OnPlayerRunCmdPost(int client, int buttons, int impulse, const float vel[3], const float angles[3], int weapon, int subtype, int cmdnum, int tickcount, int seed, const int mouse[2])
public Action Movement_OnPlayerMovePost(int client)
{
OnPlayerRunCmdPost_JumpTracking(client);
Movement_OnPlayerMovePost_JumpTracking(client);
return Plugin_Continue;
}

public void Movement_OnStartTouchGround(int client)
Expand Down
8 changes: 2 additions & 6 deletions addons/sourcemod/scripting/gokz-jumpstats/jump_tracking.sp
Original file line number Diff line number Diff line change
Expand Up @@ -1425,19 +1425,15 @@ public Action Movement_OnWalkMovePost(int client)
return Plugin_Continue;
}

public Action Movement_OnPlayerMovePost(int client)
{
lastMovementProcessedTime[client] = jumpTrackers[client].tickCount;
return Plugin_Continue;
}

public void OnPlayerRunCmdPost_JumpTracking(int client)
public void Movement_OnPlayerMovePost_JumpTracking(int client)
{
if (!IsValidClient(client) || !IsPlayerAlive(client))
{
return;
}

lastMovementProcessedTime[client] = jumpTrackers[client].tickCount;
// Check for always failstats
if (doFailstatAlways[client])
{
Expand Down

0 comments on commit 8fdf554

Please sign in to comment.