1
0
Fork 0
mirror of https://git.rip/DMCA_FUCKER/re3.git synced 2024-12-23 12:00:01 +00:00
This commit is contained in:
Roman Masanin 2020-10-24 20:47:03 +03:00
parent beae41b207
commit a9db60a1d9
2 changed files with 35 additions and 41 deletions

View file

@ -3704,38 +3704,34 @@ DoJumboVolOffset()
}
void
cAudioManager::ProcessJumbo(cVehicleParams *params)
cAudioManager::ProcessJumbo(cVehicleParams* params)
{
CPlane *plane;
CPlane* plane;
float position;
if (params->m_fDistance < SQR(440)) {
CalculateDistance(params->m_bDistanceCalculated, params->m_fDistance);
plane = (CPlane *)params->m_pVehicle;
DoJumboVolOffset();
position = PlanePathPosition[plane->m_nPlaneId];
if (position <= TakeOffPoint) {
if (plane->m_fSpeed <= 0.103344f) {
ProcessJumboTaxi();
return;
}
if (params->m_fDistance >= SQR(440))
return;
CalculateDistance(params->m_bDistanceCalculated, params->m_fDistance);
plane = (CPlane*)params->m_pVehicle;
DoJumboVolOffset();
position = PlanePathPosition[plane->m_nPlaneId];
if (position <= TakeOffPoint) {
if (plane->m_fSpeed > 0.103344f) {
ProcessJumboAccel(plane);
} else if (300.0f + TakeOffPoint >= position) {
ProcessJumboTakeOff(plane);
} else if (LandingPoint - 350.0f >= position) {
ProcessJumboFlying();
} else {
if (position > LandingPoint) {
if (plane->m_fSpeed > 0.103344f) {
ProcessJumboDecel(plane);
return;
}
ProcessJumboTaxi();
return;
}
ProcessJumboLanding(plane);
ProcessJumboTaxi();
}
} else if (position <= TakeOffPoint + 300.0f) {
ProcessJumboTakeOff(plane);
} else if (position <= LandingPoint - 350.0f) {
ProcessJumboFlying();
} else if (position <= LandingPoint) {
ProcessJumboLanding(plane);
} else if (plane->m_fSpeed > 0.103344f) {
ProcessJumboDecel(plane);
} else {
ProcessJumboTaxi();
}
}
@ -3753,25 +3749,23 @@ cAudioManager::ProcessJumboAccel(CPlane *plane)
{
int32 engineFreq;
int32 vol;
float whineSoundFreq;
float modificator;
float freqModifier;
if (SetupJumboFlySound(20)) {
modificator = (plane->m_fSpeed - 0.103344f) * 1.6760077f;
if (modificator > 1.0f)
modificator = 1.0f;
modificator = Min(1.0f, (plane->m_fSpeed - 0.103344f) * 1.6760077f);
if (SetupJumboRumbleSound(MAX_VOLUME * modificator) && SetupJumboTaxiSound((1.0f - modificator) * 75.f)) {
if (modificator < 0.2f) {
whineSoundFreq = modificator * 5.f * 14600.0f + 29500;
vol = modificator * 5.f * MAX_VOLUME;
engineFreq = modificator * 5.f * 6050.f + 16000;
freqModifier = modificator * 5.0f;
vol = MAX_VOLUME * freqModifier;
engineFreq = 6050.0f * freqModifier + 16000;
} else {
whineSoundFreq = 44100;
freqModifier = 1.0f;
engineFreq = 22050;
vol = MAX_VOLUME;
}
SetupJumboEngineSound(vol, engineFreq);
SetupJumboWhineSound(18, whineSoundFreq);
SetupJumboWhineSound(18, 14600.0f * freqModifier + 29500);
}
}
}

View file

@ -325,13 +325,13 @@ public:
void ProcessGarages(); //
void ProcessCarHeli(cVehicleParams* params); // done
void ProcessVehicleFlatTyre(cVehicleParams* params); // done
void ProcessJumbo(cVehicleParams *); //
void ProcessJumboAccel(CPlane *plane); //
void ProcessJumboDecel(CPlane *plane); //
void ProcessJumboFlying(); //
void ProcessJumboLanding(CPlane *plane); //
void ProcessJumboTakeOff(CPlane *plane); //
void ProcessJumboTaxi(); //
void ProcessJumbo(cVehicleParams *); // done
void ProcessJumboAccel(CPlane *plane); // done
void ProcessJumboDecel(CPlane *plane); // done
void ProcessJumboFlying(); // done
void ProcessJumboLanding(CPlane *plane); // done
void ProcessJumboTakeOff(CPlane *plane); // done
void ProcessJumboTaxi(); // done
void ProcessLoopingScriptObject(uint8 sound); //
void ProcessMissionAudio(); //
void ProcessMissionAudioSlot(uint8 slot); //