mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2024-11-30 10:56:53 -05:00
Fix session loading after all other dependencies and hanging the level load
This commit is contained in:
parent
4eed50f92a
commit
c86c3c4628
1 changed files with 5 additions and 1 deletions
|
@ -209,8 +209,12 @@ module.exports = class LevelLoader extends CocoClass
|
|||
console.log "Pushing resource: ", heroResource if LOG
|
||||
@worldNecessities.push heroResource
|
||||
@sessionDependenciesRegistered[session.id] = true
|
||||
unless @level.isType('hero', 'hero-ladder', 'hero-coop')
|
||||
# Return before loading heroConfig ThangTypes. Finish if all world necessities were completed by the time the session loaded.
|
||||
if @checkAllWorldNecessitiesRegisteredAndLoaded()
|
||||
@onWorldNecessitiesLoaded()
|
||||
return
|
||||
return unless @level.isType('hero', 'hero-ladder', 'hero-coop')
|
||||
# Load the ThangTypes needed for the session's heroConfig for these types of levels
|
||||
heroConfig = session.get('heroConfig')
|
||||
heroConfig ?= me.get('heroConfig') if session is @session and not @headless
|
||||
heroConfig ?= {}
|
||||
|
|
Loading…
Reference in a new issue