diff options
author | aap <aap@papnet.eu> | 2019-07-06 19:44:00 +0200 |
---|---|---|
committer | aap <aap@papnet.eu> | 2019-07-06 19:44:00 +0200 |
commit | 00461224a94692f5cdafc1b4309923a5539f1113 (patch) | |
tree | f3642f0f2cb985c61bb76e5bdb0988e1be1285c5 /src/audio | |
parent | misc classes finished (diff) | |
download | re3-00461224a94692f5cdafc1b4309923a5539f1113.tar re3-00461224a94692f5cdafc1b4309923a5539f1113.tar.gz re3-00461224a94692f5cdafc1b4309923a5539f1113.tar.bz2 re3-00461224a94692f5cdafc1b4309923a5539f1113.tar.lz re3-00461224a94692f5cdafc1b4309923a5539f1113.tar.xz re3-00461224a94692f5cdafc1b4309923a5539f1113.tar.zst re3-00461224a94692f5cdafc1b4309923a5539f1113.zip |
Diffstat (limited to '')
-rw-r--r-- | src/audio/AudioManager.cpp | 87 |
1 files changed, 80 insertions, 7 deletions
diff --git a/src/audio/AudioManager.cpp b/src/audio/AudioManager.cpp index 812c9d62..76ef8244 100644 --- a/src/audio/AudioManager.cpp +++ b/src/audio/AudioManager.cpp @@ -1,3 +1,6 @@ +#include "common.h" +#include "patcher.h" + #include "AudioManager.h" #include "DMAudio.h" @@ -10,10 +13,80 @@ #include "Vehicle.h" #include "World.h" -#include "common.h" -#include "patcher.h" - -#include <cmath> +// TODO: where is this used? Is this the right file? +enum eVehicleModel +{ + LANDSTAL, + IDAHO, + STINGER, + LINERUN, + PEREN, + SENTINEL, + PATRIOT, + FIRETRUK, + TRASH, + STRETCH, + MANANA, + INFERNUS, + BLISTA, + PONY, + MULE, + CHEETAH, + AMBULAN, + FBICAR, + MOONBEAM, + ESPERANT, + TAXI, + KURUMA, + BOBCAT, + MRWHOOP, + BFINJECT, + CORPSE, + POLICE, + ENFORCER, + SECURICA, + BANSHEE, + PREDATOR, + BUS, + RHINO, + BARRACKS, + TRAIN, + CHOPPER, + DODO, + COACH, + CABBIE, + STALLION, + RUMPO, + RCBANDIT, + BELLYUP, + MRWONGS, + MAFIA, + YARDIE, + YAKUZA, + DIABLOS, + COLUMB, + HOODS, + AIRTRAIN, + DEADDODO, + SPEEDER, + REEFER, + PANLANT, + FLATBED, + YANKEE, + ESCAPE, + BORGNINE, + TOYZ, + GHOST, + CAR151, + CAR152, + CAR153, + CAR154, + CAR155, + CAR156, + CAR157, + CAR158, + CAR159, +}; cAudioManager &AudioManager = *(cAudioManager *)0x880FC0; @@ -132,7 +205,7 @@ void cAudioManager::CalculateDistance(bool *ptr, float dist) { if(*ptr == false) { - m_sQueueSample.m_fDistance = std::sqrt(dist); + m_sQueueSample.m_fDistance = sqrt(dist); *ptr = true; } } @@ -267,14 +340,14 @@ cAudioManager::ClearRequestedQueue() bool cAudioManager::UsesReverseWarning(int32 model) { - return model == LINERUN || std::abs(model - FIRETRUK) <= 1 || model == BUS || + return model == LINERUN || fabs(model - FIRETRUK) <= 1 || model == BUS || model == COACH; // fix } bool cAudioManager::HasAirBrakes(int32 model) { - return model == LINERUN || std::abs(model - FIRETRUK) <= 1 || model == BUS || + return model == LINERUN || fabs(model - FIRETRUK) <= 1 || model == BUS || model == COACH; // fix } |