diff --git a/js/game.js b/js/game.js index 8f4c485..6dd85f0 100644 --- a/js/game.js +++ b/js/game.js @@ -2556,18 +2556,18 @@ export class Level extends LevelInterface { tile[key] = val; } - collect_chip() { + collect_chip(actor) { if (this.chips_remaining > 0) { if (this.chips_remaining > 1) { - this.sfx.play_once('get-chip'); + this.sfx.play_once('get-chip', actor.cell); } else { - this.sfx.play_once('get-chip-last'); + this.sfx.play_once('get-chip-last', actor.cell); } - this.chips_remaining--; + this.chips_remaining -= 1; } else { - this.sfx.play_once('get-chip-extra'); + this.sfx.play_once('get-chip-extra', actor.cell); } } diff --git a/js/main.js b/js/main.js index 2093e20..5c12075 100644 --- a/js/main.js +++ b/js/main.js @@ -270,11 +270,11 @@ class SFXPlayer { if ('positionX' in listener) { listener.positionX.value = 0; listener.positionY.value = 0; - listener.positionZ.value = -8; + listener.positionZ.value = -7; } else { // Old way, only one Firefox supports atm ú_ù - listener.setPosition(0, 0, -8); + listener.setPosition(0, 0, -7); } if ('forwardX' in listener) { listener.forwardX.value = 0; @@ -465,7 +465,7 @@ class SFXPlayer { listener.positionY.value = y; } else { - listener.setPosition(x, y, -8); + listener.setPosition(x, y, -7); } } diff --git a/js/tiletypes.js b/js/tiletypes.js index c7b5458..ab41616 100644 --- a/js/tiletypes.js +++ b/js/tiletypes.js @@ -1340,7 +1340,7 @@ const TILE_TYPES = { blocks_collision: COLLISION.block_cc1 | COLLISION.monster_typical, item_priority: PICKUP_PRIORITIES.real_player, on_pickup(me, level, other) { - level.collect_chip(); + level.collect_chip(me); return true; }, // Not affected by gray buttons @@ -3105,7 +3105,7 @@ const TILE_TYPES = { blocks_collision: COLLISION.block_cc1 | COLLISION.monster_typical, item_priority: PICKUP_PRIORITIES.real_player, on_pickup(me, level, other) { - level.collect_chip(); + level.collect_chip(me); return true; }, }, @@ -3115,7 +3115,7 @@ const TILE_TYPES = { blocks_collision: COLLISION.block_cc1 | COLLISION.monster_typical, item_priority: PICKUP_PRIORITIES.real_player, on_pickup(me, level, other) { - level.collect_chip(); + level.collect_chip(me); return true; }, },