mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2025-04-26 14:03:28 -04:00
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
|
||||
|
||||
@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
|
||||
|
|
|
@ -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()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue