Skip to content

Commit

Permalink
Made replay plugin not record more frames after going past time limit.
Browse files Browse the repository at this point in the history
  • Loading branch information
shavitush committed Sep 22, 2018
1 parent 54c7e2d commit 619e7da
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions addons/sourcemod/scripting/shavit-replay.sp
Original file line number Diff line number Diff line change
Expand Up @@ -1682,6 +1682,17 @@ public Action OnPlayerRunCmd(int client, int &buttons, int &impulse, float vel[3

else if(ReplayEnabled(Shavit_GetBhopStyle(client)) && Shavit_GetTimerStatus(client) == Timer_Running)
{
if((gI_PlayerFrames[client] / gF_Tickrate) > gF_TimeLimit)
{
// in case of bad timing
if(gB_HijackFrame[client])
{
gB_HijackFrame[client] = false;
}

return Plugin_Continue;
}

gA_PlayerFrames[client].Resize(gI_PlayerFrames[client] + 1);

gA_PlayerFrames[client].Set(gI_PlayerFrames[client], vecCurrentPosition[0], 0);
Expand Down

0 comments on commit 619e7da

Please sign in to comment.