mirror of
https://github.com/SashLilac/cambridge.git
synced 2024-12-22 22:39:02 -06:00
Ensure replays are only saved once per game
This commit is contained in:
parent
5f81c35677
commit
52ddbbc174
@ -179,6 +179,9 @@ function GameMode:update(inputs, ruleset)
|
||||
if self.game_over or self.completed then
|
||||
if self.save_replay and self.game_over_frames == 0 then
|
||||
self:saveReplay()
|
||||
|
||||
-- ensure replays are only saved once per game, incase self.game_over_frames == 0 for longer than one frame
|
||||
self.save_replay = false
|
||||
end
|
||||
self.game_over_frames = self.game_over_frames + 1
|
||||
return
|
||||
|
Loading…
Reference in New Issue
Block a user