summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/audio/AudioLogic.cpp23
-rw-r--r--src/vehicles/Automobile.cpp2
2 files changed, 23 insertions, 2 deletions
diff --git a/src/audio/AudioLogic.cpp b/src/audio/AudioLogic.cpp
index 3bc7f279..10e0c78b 100644
--- a/src/audio/AudioLogic.cpp
+++ b/src/audio/AudioLogic.cpp
@@ -2349,6 +2349,8 @@ cAudioManager::ProcessVehicleOneShots(cVehicleParams *params)
static uint8 GunIndex = 53;
static uint8 iWheelIndex = 82;
static uint8 CrunchOffset = 0;
+ static uint8 heliIndex = 0;
+
for (int i = 0; i < m_asAudioEntities[m_sQueueSample.m_nEntityIndex].m_AudioEvents; i++) {
noReflections = 0;
@@ -2623,6 +2625,25 @@ cAudioManager::ProcessVehicleOneShots(cVehicleParams *params)
emittingVol = m_anRandomTable[4] % 25 + 75;
break;
}
+ case SOUND_31:{
+ const float SOUND_INTENSITY = 35.0f;
+ relVol = ((CAutomobile*)params->m_pVehicle)->m_aWheelSpeed[1] * 50.0f / 11.0f;
+ if (relVol < 0.2 || 1.0 == relVol)
+ continue;
+ relVol /= 20;
+ emittingVol = (1.0f - relVol) * 70.0f;
+ maxDist = SQR(SOUND_INTENSITY);
+ m_sQueueSample.m_nSampleIndex = SFX_CAR_HELI_ROT;
+ m_sQueueSample.m_nBankIndex = SFX_BANK_0;
+ m_sQueueSample.m_nCounter = heliIndex + 89;
+ heliIndex = heliIndex != 1 ? heliIndex + 1 : 0;
+ m_sQueueSample.m_nFrequency = (8000.0f * relVol) + 16000;
+ m_sQueueSample.m_nFrequency += RandomDisplacement(m_sQueueSample.m_nFrequency / 32);
+ m_sQueueSample.m_nReleasingVolumeModificator = 2;
+ m_sQueueSample.m_fSpeedMultiplier = 0.0f;
+ m_sQueueSample.m_fSoundIntensity = SOUND_INTENSITY;
+ break;
+ }
case SOUND_WEAPON_SHOT_FIRED: {
const float SOUND_INTENSITY = 120.0f;
emittingVol = m_anRandomTable[2];
@@ -3498,7 +3519,7 @@ cAudioManager::ProcessVehicleFlatTyre(cVehicleParams* params)
if (automobile->Damage.GetWheelStatus(i) == 1 && automobile->m_aWheelTimer[i] > 0.0)
someBool = true;
if (!someBool)
- //return;
+ return;
break;
case 5:
bike = (CBike*)params->m_pVehicle;
diff --git a/src/vehicles/Automobile.cpp b/src/vehicles/Automobile.cpp
index eec44c35..0154ae05 100644
--- a/src/vehicles/Automobile.cpp
+++ b/src/vehicles/Automobile.cpp
@@ -1486,7 +1486,7 @@ CAutomobile::ProcessControl(void)
CMatrix mat;
mat.Attach(RwFrameGetMatrix(m_aCarNodes[CAR_BONNET]));
CVector blade = mat.GetRight();
- blade = GetMatrix() * blade;
+ blade = Multiply3x3(blade, GetMatrix());
camDist /= Max(Sqrt(distSq), 0.01f);
if(Abs(DotProduct(camDist, blade)) > 0.95f){
DMAudio.PlayOneShot(m_audioEntityId, SOUND_31, 0.0f);