summaryrefslogtreecommitdiffstats
path: root/src/audio
diff options
context:
space:
mode:
authoraap <aap@papnet.eu>2019-07-31 23:57:18 +0200
committeraap <aap@papnet.eu>2019-07-31 23:57:18 +0200
commit78c15c4828a540fd6ad4f1816b8cc9610409f740 (patch)
tree800fc93cb0226accb1806a8104bc3eccfb4f71f7 /src/audio
parentMerge branch 'master' of github.com:GTAmodding/re3 (diff)
downloadre3-78c15c4828a540fd6ad4f1816b8cc9610409f740.tar
re3-78c15c4828a540fd6ad4f1816b8cc9610409f740.tar.gz
re3-78c15c4828a540fd6ad4f1816b8cc9610409f740.tar.bz2
re3-78c15c4828a540fd6ad4f1816b8cc9610409f740.tar.lz
re3-78c15c4828a540fd6ad4f1816b8cc9610409f740.tar.xz
re3-78c15c4828a540fd6ad4f1816b8cc9610409f740.tar.zst
re3-78c15c4828a540fd6ad4f1816b8cc9610409f740.zip
Diffstat (limited to 'src/audio')
-rw-r--r--src/audio/AudioManager.cpp19
1 files changed, 8 insertions, 11 deletions
diff --git a/src/audio/AudioManager.cpp b/src/audio/AudioManager.cpp
index dfecafb2..bffdc27f 100644
--- a/src/audio/AudioManager.cpp
+++ b/src/audio/AudioManager.cpp
@@ -17,6 +17,7 @@
#include "SampleManager.h"
#include "Stats.h"
#include "Vehicle.h"
+#include "Plane.h"
#include "World.h"
uint32 *audioLogicTimers = (uint32 *)0x6508A0;
@@ -4338,10 +4339,6 @@ cAudioManager::ProcessHomeScriptObject(uint8 sound)
}
}
-float *PlanePathPosition = (float *)0x8F5FC8;
-float &LandingPoint = *(float *)0x8F2C7C;
-float &TakeOffPoint = *(float *)0x8E28A4;
-
void
cAudioManager::ProcessJumbo(cVehicleParams *params)
{
@@ -4352,9 +4349,9 @@ cAudioManager::ProcessJumbo(cVehicleParams *params)
CalculateDistance((bool *)params, params->m_fDistance);
plane = (CPlane *)params->m_pVehicle;
DoJumboVolOffset();
- position = PlanePathPosition[plane->m_wIndex];
+ position = PlanePathPosition[plane->m_nPlaneId];
if(position <= TakeOffPoint) {
- if(plane->field_656 <= 0.10334f) {
+ if(plane->m_fSpeed <= 0.10334f) {
ProcessJumboTaxi();
return;
}
@@ -4366,7 +4363,7 @@ cAudioManager::ProcessJumbo(cVehicleParams *params)
ProcessJumboFlying();
} else {
if(position > LandingPoint) {
- if(plane->field_656 > 0.10334f) {
+ if(plane->m_fSpeed > 0.10334f) {
ProcessJumboDecel(plane);
return;
}
@@ -4387,7 +4384,7 @@ cAudioManager::ProcessJumboAccel(CPlane *plane)
float modificator;
if(SetupJumboFlySound(20u)) {
- modificator = (plane->field_656 - 0.10334f) * 1.676f;
+ modificator = (plane->m_fSpeed - 0.10334f) * 1.676f;
if(modificator > 1.0f) modificator = 1.0f;
if(cAudioManager::SetupJumboRumbleSound(maxVolume * modificator) &&
SetupJumboTaxiSound((1.0f - modificator) * 75.f)) {
@@ -4412,7 +4409,7 @@ cAudioManager::ProcessJumboDecel(CPlane *plane)
float modificator;
if(SetupJumboFlySound(20u) && SetupJumboTaxiSound(75u)) {
- modificator = (plane->field_656 - 0.10334f) * 1.676f;
+ modificator = (plane->m_fSpeed - 0.10334f) * 1.676f;
if(modificator > 1.0f) modificator = 1.0f;
SetupJumboEngineSound(maxVolume * modificator, 6050.f * modificator + 16000);
SetupJumboWhineSound(18u, 29500);
@@ -4428,7 +4425,7 @@ cAudioManager::ProcessJumboFlying()
void
cAudioManager::ProcessJumboLanding(CPlane *plane)
{
- float modificator = (LandingPoint - PlanePathPosition[plane->m_wIndex]) * 0.0028571f;
+ float modificator = (LandingPoint - PlanePathPosition[plane->m_nPlaneId]) * 0.0028571f;
if(SetupJumboFlySound(107.f * modificator + 20)) {
if(SetupJumboTaxiSound(75.f * (1.f - modificator))) {
SetupJumboEngineSound(maxVolume, 22050);
@@ -4441,7 +4438,7 @@ cAudioManager::ProcessJumboLanding(CPlane *plane)
void
cAudioManager::ProcessJumboTakeOff(CPlane *plane)
{
- double modificator = (PlanePathPosition[plane->m_wIndex] - TakeOffPoint) * 0.0033333f;
+ double modificator = (PlanePathPosition[plane->m_nPlaneId] - TakeOffPoint) * 0.0033333f;
if(cAudioManager::SetupJumboFlySound((107.f * modificator) + 20) &&
cAudioManager::SetupJumboRumbleSound(maxVolume * (1.f - modificator))) {