mirror of
https://github.com/JonnyBro/beatrun.git
synced 2024-12-29 05:13:02 +05:00
Reorder some code to prevent extra print calls
This commit is contained in:
parent
8c18caab1d
commit
fd07e344d8
1 changed files with 5 additions and 5 deletions
|
@ -42,12 +42,12 @@ end
|
||||||
|
|
||||||
function ReplayStop(ply, dontsave)
|
function ReplayStop(ply, dontsave)
|
||||||
--if not game.SinglePlayer() then return end
|
--if not game.SinglePlayer() then return end
|
||||||
|
if not ply.ReplayTicks then return end
|
||||||
|
if ply.InReplay then return end
|
||||||
if dontsave then
|
if dontsave then
|
||||||
print("Replay Ended - NOT SAVED")
|
print("Replay Ended - NOT SAVED")
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
if not ply.ReplayTicks then return end
|
|
||||||
if ply.InReplay then return end
|
|
||||||
|
|
||||||
print("Ending Replay (" .. #ply.ReplayTicks .. "ticks)")
|
print("Ending Replay (" .. #ply.ReplayTicks .. "ticks)")
|
||||||
|
|
||||||
|
@ -143,9 +143,9 @@ function ReplaySendToClient(ply, args)
|
||||||
|
|
||||||
local compressedreplay = util.Compress(util.TableToJSON(replaydata))
|
local compressedreplay = util.Compress(util.TableToJSON(replaydata))
|
||||||
|
|
||||||
if replaydata[3] != engine.TickInterval then
|
if replaydata[3] != engine.TickInterval() then
|
||||||
errorstring = "Replay tickrate and current tickrate does not match. Replay tick interval is: " .. (1 / engine.TickInterval())
|
errorstring = "Replay tickrate and current tickrate does not match. Replay tick interval is: " .. (replaydata[3]) .. " " .. engine.TickInterval()
|
||||||
ErrorNoHalt(errorstring)
|
print(errorstring)
|
||||||
end
|
end
|
||||||
|
|
||||||
net.Start("ReplaySendToClient")
|
net.Start("ReplaySendToClient")
|
||||||
|
|
Loading…
Reference in a new issue