diff --git a/app/lib/surface/Lank.coffee b/app/lib/surface/Lank.coffee index f951c9828..7171fc0da 100644 --- a/app/lib/surface/Lank.coffee +++ b/app/lib/surface/Lank.coffee @@ -680,6 +680,12 @@ module.exports = Lank = class Lank extends CocoClass @lastGold = gold Backbone.Mediator.publish 'surface:gold-changed', {team: @thang.team, gold: gold, goldEarned: Math.floor(@thang.goldEarned ? 0)} + shouldMuteMessage: (m) -> + return true if m in ['moveRight', 'moveUp', 'moveDown', 'moveLeft'] + return true if /^attack /.test m + return true if /^Repeating loop/.test m + false + playSounds: (withDelay=true, volume=1.0) -> for event in @thang.currentEvents ? [] @playSound event, withDelay, volume @@ -687,7 +693,7 @@ module.exports = Lank = class Lank extends CocoClass AudioPlayer.playInterfaceSound 'coin_1', 0.25 if @thang.actionActivated and (action = @thang.getActionName()) isnt 'say' @playSound action, withDelay, volume - if @thang.sayMessage and withDelay and not @thang.silent # don't play sayMessages while scrubbing, annoying + if @thang.sayMessage and withDelay and not @thang.silent and not @shouldMuteMessage @thang.sayMessage # don't play sayMessages while scrubbing, annoying offsetFrames = Math.abs(@thang.sayStartTime - @thang.world.age) / @thang.world.dt if offsetFrames <= 2 # or (not withDelay and offsetFrames < 30) sound = AudioPlayer.soundForDialogue @thang.sayMessage, @thangType.get 'soundTriggers'