From d64ce588d23cc4ea999998c17cf7be928410c635 Mon Sep 17 00:00:00 2001 From: Zeno Rogue Date: Fri, 11 Jan 2019 02:24:37 +0100 Subject: [PATCH] clicking sounds for traps --- game.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/game.cpp b/game.cpp index ada2e52e..7e9bde3b 100644 --- a/game.cpp +++ b/game.cpp @@ -3442,6 +3442,7 @@ array traplimits(cell *c) { void activateArrowTrap(cell *c) { if(c->wall == waArrowTrap && c->wparam == 0) { + playSound(c, "click"); c->wparam = shmup::on ? 2 : 1; forCellEx(c2, c) activateArrowTrap(c2); if(shmup::on) shmup::activateArrow(c); @@ -3474,8 +3475,10 @@ void moveEffect(cell *ct, cell *cf, eMonster m, int direction_hint) { if(ct->wall == waArrowTrap && !ignoresPlates(m) && normal_gravity_at(ct)) activateArrowTrap(ct); - if(ct->wall == waFireTrap && !ignoresPlates(m) && ct->wparam == 0 && normal_gravity_at(ct)) + if(ct->wall == waFireTrap && !ignoresPlates(m) && ct->wparam == 0 && normal_gravity_at(ct)) { + playSound(ct, "click"); ct->wparam = 1; + } if(cf && isPrincess(m)) princess::move(ct, cf); @@ -3559,8 +3562,10 @@ void playerMoveEffects(cell *c1, cell *c2) { if(c2->wall == waArrowTrap && c2->wparam == 0 && normal_gravity_at(c2) && !markOrb(itOrbAether)) activateArrowTrap(c2); - if(c2->wall == waFireTrap && c2->wparam == 0 && normal_gravity_at(c2) &&!markOrb(itOrbAether)) + if(c2->wall == waFireTrap && c2->wparam == 0 && normal_gravity_at(c2) &&!markOrb(itOrbAether)) { + playSound(c2, "click"); c2->wparam = 1; + } princess::playernear(c2);