Small tweak to lower the number of repeated calls to SpriteBoss.updateSounds.

This commit is contained in:
Scott Erickson 2014-07-13 11:13:26 -07:00
parent 202a562c51
commit 3b6d17286b

View file

@ -608,7 +608,7 @@ module.exports = Surface = class Surface extends CocoClass
ratio = current % 1
@world.frames[next].restorePartialState ratio if next > 1
frame.clearEvents() if parseInt(@currentFrame) is parseInt(@lastFrame)
@spriteBoss.updateSounds()
@spriteBoss.updateSounds() if parseInt(@currentFrame) isnt parseInt(@lastFrame)
updateState: (frameChanged) ->
# world state must have been restored in @restoreWorldState