diff --git a/app/lib/surface/CocoSprite.coffee b/app/lib/surface/CocoSprite.coffee index cd63513c5..75c99088f 100644 --- a/app/lib/surface/CocoSprite.coffee +++ b/app/lib/surface/CocoSprite.coffee @@ -758,7 +758,7 @@ module.exports = CocoSprite = class CocoSprite extends CocoClass endFunc = => @lastTween = null - @imageObject.gotoAndPlay(endAnimation) + @imageObject.gotoAndPlay(endAnimation) unless @stillLoading @shadow.action = 'idle' @update true @possessed = false diff --git a/app/lib/surface/Surface.coffee b/app/lib/surface/Surface.coffee index b82683ea3..14e3cf15e 100644 --- a/app/lib/surface/Surface.coffee +++ b/app/lib/surface/Surface.coffee @@ -281,6 +281,7 @@ module.exports = Surface = class Surface extends CocoClass onSetPlaying: (e) -> @playing = (e ? {}).playing ? true + @setPlayingCalled = true if @playing and @currentFrame >= (@world.totalFrames - 5) @currentFrame = 0 if @fastForwarding and not @playing @@ -352,6 +353,7 @@ module.exports = Surface = class Surface extends CocoClass @casting = true @wasPlayingWhenCastingBegan = @playing Backbone.Mediator.publish 'level-set-playing', { playing: false } + @setPlayingCalled = false # don't overwrite playing settings if they changed by, say, scripts if @coordinateDisplay? @surfaceTextLayer.removeChild @coordinateDisplay @@ -370,7 +372,7 @@ module.exports = Surface = class Surface extends CocoClass # This has a tendency to break scripts that are waiting for playback to change when the level is loaded # so only run it after the first world is created. - Backbone.Mediator.publish 'level-set-playing', { playing: @wasPlayingWhenCastingBegan } unless event.firstWorld + Backbone.Mediator.publish 'level-set-playing', { playing: @wasPlayingWhenCastingBegan } unless event.firstWorld or @setPlayingCalled fastForwardTo = null if @playing diff --git a/app/lib/surface/WizardSprite.coffee b/app/lib/surface/WizardSprite.coffee index 3fa6de119..b502cce4c 100644 --- a/app/lib/surface/WizardSprite.coffee +++ b/app/lib/surface/WizardSprite.coffee @@ -47,6 +47,13 @@ module.exports = class WizardSprite extends IndieSprite thang.pos.z += thang.bobHeight thang + finishSetup: -> + @updateBaseScale() + @scaleFactor = @thang.scaleFactor if @thang?.scaleFactor + @updateScale() + @updateRotation() + # Don't call general update() because Thang isn't built yet + onPlayerStatesChanged: (e) -> for playerID, state of e.states continue unless playerID is @thang.id