diff options
author | eray orçunus <erayorcunus@gmail.com> | 2019-07-07 00:36:39 +0200 |
---|---|---|
committer | eray orçunus <erayorcunus@gmail.com> | 2019-07-07 00:39:58 +0200 |
commit | ee8e16376b4d0fcb199762274946c16b8f42c04f (patch) | |
tree | 0aec680fb9460225c18231d26d78b75f522c2592 /src/audio/AudioManager.cpp | |
parent | General fixes (diff) | |
parent | some work on vehicles (diff) | |
download | re3-ee8e16376b4d0fcb199762274946c16b8f42c04f.tar re3-ee8e16376b4d0fcb199762274946c16b8f42c04f.tar.gz re3-ee8e16376b4d0fcb199762274946c16b8f42c04f.tar.bz2 re3-ee8e16376b4d0fcb199762274946c16b8f42c04f.tar.lz re3-ee8e16376b4d0fcb199762274946c16b8f42c04f.tar.xz re3-ee8e16376b4d0fcb199762274946c16b8f42c04f.tar.zst re3-ee8e16376b4d0fcb199762274946c16b8f42c04f.zip |
Diffstat (limited to 'src/audio/AudioManager.cpp')
-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 } |