Fixed bug with playback ending early.

This commit is contained in:
Nick Winter 2014-05-12 08:35:46 -07:00
parent 714d17fd7f
commit e1b35251a3

View file

@ -246,7 +246,7 @@ module.exports = class World
@goalManager.setGoalState(goalID, status)
endWorld: (victory=false, delay=3, tentative=false) ->
@totalFrames = Math.min(@totalFrames, @frames.length + Math.floor(delay / @dt)) - 1 # end a few seconds later
@totalFrames = Math.min(@totalFrames, @frames.length + Math.floor(delay / @dt)) # end a few seconds later
@victory = victory # TODO: should just make this signify the winning superteam
@victoryIsTentative = tentative
status = if @victory then 'won' else 'lost'