diff options
author | Thanasis Antoniou | 2019-04-05 21:33:47 +0300 |
---|---|---|
committer | Thanasis Antoniou | 2019-04-05 21:35:55 +0300 |
commit | a0beaa6f4e925292f3ffaa8045e580cd579d3ed0 (patch) | |
tree | 8debb2e8a7d8d7a58295d939ea8cd8bfe2b3e8e5 /engines/bladerunner/combat.cpp | |
parent | 62660da0bc8bdbaa464f8b25ee993f6dfb90aa85 (diff) | |
download | scummvm-rg350-a0beaa6f4e925292f3ffaa8045e580cd579d3ed0.tar.gz scummvm-rg350-a0beaa6f4e925292f3ffaa8045e580cd579d3ed0.tar.bz2 scummvm-rg350-a0beaa6f4e925292f3ffaa8045e580cd579d3ed0.zip |
BLADERUNNER: SFX named constants and MissSound fix
Still pending cleaning up Ambient_Sounds_Add_Sound and Ambient_Sounds_Add_Looping_Sound calls
Diffstat (limited to 'engines/bladerunner/combat.cpp')
-rw-r--r-- | engines/bladerunner/combat.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/engines/bladerunner/combat.cpp b/engines/bladerunner/combat.cpp index a6677a1469..08d8ce2cc7 100644 --- a/engines/bladerunner/combat.cpp +++ b/engines/bladerunner/combat.cpp @@ -97,19 +97,19 @@ void Combat::disable() { } void Combat::setHitSound(int ammoType, int column, int soundId) { - _hitSoundId[ammoType * 3 + column] = soundId; + _hitSoundId[(kSoundCount/_vm->_settings->getAmmoTypesCount()) * ammoType + column] = soundId; } void Combat::setMissSound(int ammoType, int column, int soundId) { - _missSoundId[ammoType * 3 + column] = soundId; + _missSoundId[(kSoundCount/_vm->_settings->getAmmoTypesCount()) * ammoType + column] = soundId; } int Combat::getHitSound() const { - return _hitSoundId[3 * _vm->_settings->getAmmoType() + _vm->_rnd.getRandomNumber(2)]; + return _hitSoundId[(kSoundCount/_vm->_settings->getAmmoTypesCount()) * _vm->_settings->getAmmoType() + _vm->_rnd.getRandomNumber(2)]; } int Combat::getMissSound() const { - return _hitSoundId[3 * _vm->_settings->getAmmoType() + _vm->_rnd.getRandomNumber(2)]; + return _missSoundId[(kSoundCount/_vm->_settings->getAmmoTypesCount()) * _vm->_settings->getAmmoType() + _vm->_rnd.getRandomNumber(2)]; } void Combat::shoot(int actorId, Vector3 &to, int screenX) { |