From 4f34901613c127053d6bd026207d2c21a16ba40a Mon Sep 17 00:00:00 2001 From: shavit Date: Sun, 24 Dec 2017 23:39:50 +0200 Subject: [PATCH] Fix for replay saving. Some replays would not overwrite because of disrepancy between record time and frame count. This commit makes it so the replay saves as long as it contains less frames than the old one, which usually results in less time spent running. --- addons/sourcemod/scripting/shavit-replay.sp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/sourcemod/scripting/shavit-replay.sp b/addons/sourcemod/scripting/shavit-replay.sp index ec08d194..52eefe04 100644 --- a/addons/sourcemod/scripting/shavit-replay.sp +++ b/addons/sourcemod/scripting/shavit-replay.sp @@ -1236,9 +1236,9 @@ public void Shavit_OnFinish(int client, int style, float time, int jumps, int st float fWR = 0.0; Shavit_GetWRTime(style, fWR, track); - if(!view_as(gA_FrameCache[style][track][2]) && view_as(gA_FrameCache[style][track][0] != 0)) + if(!view_as(gA_FrameCache[style][track][2])) { - if(time >= fWR) + if(view_as(gA_FrameCache[style][track][0]) != 0 && gI_PlayerFrames[client] > gA_FrameCache[style][track][0]) { return; }