mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2025-03-20 18:10:44 -04:00
Fixed the placement of wall sprites in the level editor to wait until the sprite sheet is finished being built.
This commit is contained in:
parent
5a407492db
commit
bd575ad667
2 changed files with 3 additions and 3 deletions
app/lib/surface
|
@ -293,7 +293,8 @@ module.exports = CocoSprite = class CocoSprite extends CocoClass
|
|||
p1.z += bobOffset
|
||||
x: p1.x, y: p1.y, z: if @thang.isLand then 0 else p1.z - @thang.depth / 2
|
||||
|
||||
updatePosition: ->
|
||||
updatePosition: (log) ->
|
||||
return if @stillLoading
|
||||
return unless @thang?.pos and @options.camera?
|
||||
wop = @getWorldPosition()
|
||||
[p0, p1] = [@lastPos, @thang.pos]
|
||||
|
|
|
@ -201,8 +201,7 @@ module.exports = class SpriteBoss extends CocoClass
|
|||
cache: (update=false) ->
|
||||
return if @cached and not update
|
||||
wallSprites = (sprite for sprite in @spriteArray when sprite.thangType?.get('name').search(/(dungeon|indoor).wall/i) isnt -1)
|
||||
unless _.all (s.thangType.isFullyLoaded() for s in wallSprites)
|
||||
return
|
||||
return if _.any (s.stillLoading for s in wallSprites)
|
||||
walls = (sprite.thang for sprite in wallSprites)
|
||||
@world.calculateBounds()
|
||||
wallGrid = new Grid walls, @world.size()...
|
||||
|
|
Loading…
Reference in a new issue