Fixes Mech Spin Sounds (#87900)

## About The Pull Request
Mechs were playing spin sound effects (_on top_ of normal step sounds)
every time they'd take a step while strafing. Additionally, they would
not play the spin sound effect when actually turning. This fixes both.
## Why It's Good For The Game
Bugfix. Also, cleaner sounding mechs.
## Changelog
🆑
Fix: Fixed the triggering of mech turn sound effects
/🆑
This commit is contained in:
zxaber
2024-11-14 19:11:14 +01:00
committed by GitHub
parent 3cdaf62fea
commit 266a4af0e1
@@ -139,6 +139,8 @@
// if we're not strafing or if we are forced to rotate or if we are holding down the key
if(dir != direction && (!strafe || forcerotate || keyheld))
setDir(direction)
if(!(mecha_flags & QUIET_TURNS))
playsound(src, turnsound, 40, TRUE)
if(keyheld || !pivot_step) //If we pivot step, we don't return here so we don't just come to a stop
return TRUE
@@ -146,10 +148,6 @@
//Otherwise just walk normally
. = try_step_multiz(direction)
//dir and olddir are the current direction of the sprite and the old direction of the sprite respectively
if (dir != olddir && !(mecha_flags & QUIET_TURNS))
playsound(src, turnsound, 40, TRUE)
if(phasing)
use_energy(phasing_energy_drain)
if(strafe)