Fixed a bug with the simulator due to the changes made to the supermodel.

This commit is contained in:
Scott Erickson 2014-05-14 11:13:36 -07:00
parent 0be813e424
commit 09fbfdb360
2 changed files with 2 additions and 1 deletions

View file

@ -74,7 +74,7 @@ module.exports = class Simulator extends CocoClass
return
@supermodel ?= new SuperModel()
@supermodel.resetProgress()
@levelLoader = new LevelLoader supermodel: @supermodel, levelID: levelID, sessionID: @task.getFirstSessionID(), headless: true
if @supermodel.finished()
@simulateGame()

View file

@ -162,6 +162,7 @@ module.exports = class SuperModel extends Backbone.Model
@trigger('loaded-all') if @finished()
setMaxProgress: (@maxProgress) ->
resetProgress: -> @progress = 0
clearMaxProgress: ->
@maxProgress = 1
_.defer @updateProgress