accidentally undid a change

This commit is contained in:
rtldg 2021-03-22 06:51:27 +00:00
parent 916f141c48
commit db575c577b

View File

@ -2025,9 +2025,9 @@ public void OnClientDisconnect(int client)
public Action Shavit_OnStart(int client) public Action Shavit_OnStart(int client)
{ {
float fSpeed = Shavit_GetStyleSettingFloat(Shavit_GetBhopStyle(client), "speed"); int iMaxPreFrames = RoundToFloor(gCV_PlaybackPreRunTime.FloatValue * gF_Tickrate / Shavit_GetStyleSettingFloat(Shavit_GetBhopStyle(client), "speed"));
gI_PlayerPrerunFrames[client] = gA_PlayerFrames[client].Length - RoundToFloor(gCV_PlaybackPreRunTime.FloatValue * gF_Tickrate / fSpeed); gI_PlayerPrerunFrames[client] = gA_PlayerFrames[client].Length - iMaxPreFrames;
if(gI_PlayerPrerunFrames[client] < 0) if(gI_PlayerPrerunFrames[client] < 0)
{ {
gI_PlayerPrerunFrames[client] = 0; gI_PlayerPrerunFrames[client] = 0;
@ -2044,7 +2044,7 @@ public Action Shavit_OnStart(int client)
} }
else else
{ {
if(gA_PlayerFrames[client].Length >= RoundToFloor(gCV_PlaybackPreRunTime.FloatValue * gF_Tickrate / fSpeed)) if(gA_PlayerFrames[client].Length >= iMaxPreFrames)
{ {
gA_PlayerFrames[client].Erase(0); gA_PlayerFrames[client].Erase(0);
gI_PlayerFrames[client]--; gI_PlayerFrames[client]--;