Fix PlayGameDevLevelView when playing the first time, get frames streaming

For whatever reason, the Angel does not normally allow streaming on the first world.
I hacked around it, but would be good to figure out why that restriction is there
in the first place.
This commit is contained in:
Scott Erickson 2016-07-13 15:45:06 -07:00
parent c9986ee05a
commit 4a51045a41
2 changed files with 6 additions and 4 deletions

View file

@ -94,9 +94,9 @@ module.exports = class God extends CocoClass
return if hadPreloader
@angelsShare.workQueue = []
work =
work = {
userCodeMap: userCodeMap
level: @level
@level
levelSessionIDs: @levelSessionIDs
submissionCount: @lastSubmissionCount
fixedSeed: @lastFixedSeed
@ -104,9 +104,10 @@ module.exports = class God extends CocoClass
difficulty: @lastDifficulty
goals: @angelsShare.goalManager?.getGoals()
headless: @angelsShare.headless
preload: preload
preload
synchronous: not Worker? # Profiling world simulation is easier on main thread, or we are IE9.
realTime: realTime
realTime
}
@angelsShare.workQueue.push work
angel.workIfIdle() for angel in @angelsShare.angels
work

View file

@ -43,6 +43,7 @@ module.exports = class PlayGameDevLevelView extends RootView
@god.setWorldClassMap(@world.classMap)
@goalManager = new GoalManager(@world, @level.get('goals'), @team)
@god.setGoalManager(@goalManager)
@god.angelsShare.firstWorld = false # HACK
me.team = TEAM
@session.set 'team', TEAM
@supermodel.finishLoading()