Paths for non-admins. Making sure paths are showing when level first loads and playback ends (not sure why they are not showing up at first otherwise).

This commit is contained in:
Nick Winter 2014-11-21 13:08:40 -08:00
parent 074d9f33c2
commit f12dcec0ff

View file

@ -342,6 +342,7 @@ module.exports = Surface = class Surface extends CocoClass
@ended = true @ended = true
@setPaused true @setPaused true
Backbone.Mediator.publish 'surface:playback-ended', {} Backbone.Mediator.publish 'surface:playback-ended', {}
@updatePaths() # TODO: this is a hack to make sure paths are on the first time the level loads
else if @currentFrame < @world.totalFrames and @ended else if @currentFrame < @world.totalFrames and @ended
@ended = false @ended = false
@setPaused false @setPaused false
@ -586,7 +587,6 @@ module.exports = Surface = class Surface extends CocoClass
updatePaths: -> updatePaths: ->
return unless @options.paths and @heroLank return unless @options.paths and @heroLank
return unless me.isAdmin() # TODO: Fix world thang points, targets, then remove this
@hidePaths() @hidePaths()
return if @world.showPaths is 'never' return if @world.showPaths is 'never'
layerAdapter = @lankBoss.layerAdapters['Path'] layerAdapter = @lankBoss.layerAdapters['Path']