mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2024-11-28 01:55:38 -05:00
Fixed some script handling by not having playback changed when the first world is built.
This commit is contained in:
parent
e63763d539
commit
a1a5d5eea0
1 changed files with 4 additions and 1 deletions
|
@ -311,7 +311,10 @@ module.exports = Surface = class Surface extends CocoClass
|
||||||
onNewWorld: (event) ->
|
onNewWorld: (event) ->
|
||||||
return unless event.world.name is @world.name
|
return unless event.world.name is @world.name
|
||||||
@casting = false
|
@casting = false
|
||||||
Backbone.Mediator.publish 'level-set-playing', { playing: @wasPlayingWhenCastingBegan }
|
|
||||||
|
# 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
|
||||||
|
|
||||||
fastForwardTo = null
|
fastForwardTo = null
|
||||||
if @playing
|
if @playing
|
||||||
|
|
Loading…
Reference in a new issue