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:
parent
c9986ee05a
commit
4a51045a41
2 changed files with 6 additions and 4 deletions
app
|
@ -94,9 +94,9 @@ module.exports = class God extends CocoClass
|
||||||
return if hadPreloader
|
return if hadPreloader
|
||||||
|
|
||||||
@angelsShare.workQueue = []
|
@angelsShare.workQueue = []
|
||||||
work =
|
work = {
|
||||||
userCodeMap: userCodeMap
|
userCodeMap: userCodeMap
|
||||||
level: @level
|
@level
|
||||||
levelSessionIDs: @levelSessionIDs
|
levelSessionIDs: @levelSessionIDs
|
||||||
submissionCount: @lastSubmissionCount
|
submissionCount: @lastSubmissionCount
|
||||||
fixedSeed: @lastFixedSeed
|
fixedSeed: @lastFixedSeed
|
||||||
|
@ -104,9 +104,10 @@ module.exports = class God extends CocoClass
|
||||||
difficulty: @lastDifficulty
|
difficulty: @lastDifficulty
|
||||||
goals: @angelsShare.goalManager?.getGoals()
|
goals: @angelsShare.goalManager?.getGoals()
|
||||||
headless: @angelsShare.headless
|
headless: @angelsShare.headless
|
||||||
preload: preload
|
preload
|
||||||
synchronous: not Worker? # Profiling world simulation is easier on main thread, or we are IE9.
|
synchronous: not Worker? # Profiling world simulation is easier on main thread, or we are IE9.
|
||||||
realTime: realTime
|
realTime
|
||||||
|
}
|
||||||
@angelsShare.workQueue.push work
|
@angelsShare.workQueue.push work
|
||||||
angel.workIfIdle() for angel in @angelsShare.angels
|
angel.workIfIdle() for angel in @angelsShare.angels
|
||||||
work
|
work
|
||||||
|
|
|
@ -43,6 +43,7 @@ module.exports = class PlayGameDevLevelView extends RootView
|
||||||
@god.setWorldClassMap(@world.classMap)
|
@god.setWorldClassMap(@world.classMap)
|
||||||
@goalManager = new GoalManager(@world, @level.get('goals'), @team)
|
@goalManager = new GoalManager(@world, @level.get('goals'), @team)
|
||||||
@god.setGoalManager(@goalManager)
|
@god.setGoalManager(@goalManager)
|
||||||
|
@god.angelsShare.firstWorld = false # HACK
|
||||||
me.team = TEAM
|
me.team = TEAM
|
||||||
@session.set 'team', TEAM
|
@session.set 'team', TEAM
|
||||||
@supermodel.finishLoading()
|
@supermodel.finishLoading()
|
||||||
|
|
Reference in a new issue