mirror of
https://github.com/GTAmodding/re3.git
synced 2021-02-19 17:49:54 +01:00
Use intensity in ProcessBoatEngine
This commit is contained in:
parent
03c3eeb937
commit
7a7061ea92
@ -2407,13 +2407,13 @@ cAudioManager::ProcessBoatEngine(cVehicleParams& params)
|
|||||||
static uint16 LastAccel = 0;
|
static uint16 LastAccel = 0;
|
||||||
static uint8 LastVol = 0;
|
static uint8 LastVol = 0;
|
||||||
|
|
||||||
static const int intensity = 50;
|
static const float intensity = 50.0f;
|
||||||
|
|
||||||
if (params.m_fDistance < SQR(intensity)) {
|
if (params.m_fDistance < SQR(intensity)) {
|
||||||
boat = (CBoat *)params.m_pVehicle;
|
boat = (CBoat *)params.m_pVehicle;
|
||||||
if (params.m_nIndex == REEFER) {
|
if (params.m_nIndex == REEFER) {
|
||||||
CalculateDistance(params.m_bDistanceCalculated, params.m_fDistance);
|
CalculateDistance(params.m_bDistanceCalculated, params.m_fDistance);
|
||||||
m_sQueueSample.m_nVolume = ComputeVolume(80, 50.f, m_sQueueSample.m_fDistance);
|
m_sQueueSample.m_nVolume = ComputeVolume(80, intensity, m_sQueueSample.m_fDistance);
|
||||||
if (m_sQueueSample.m_nVolume != 0) {
|
if (m_sQueueSample.m_nVolume != 0) {
|
||||||
m_sQueueSample.m_nCounter = 39;
|
m_sQueueSample.m_nCounter = 39;
|
||||||
m_sQueueSample.m_nSampleIndex = SFX_FISHING_BOAT_IDLE;
|
m_sQueueSample.m_nSampleIndex = SFX_FISHING_BOAT_IDLE;
|
||||||
@ -2453,7 +2453,7 @@ cAudioManager::ProcessBoatEngine(cVehicleParams& params)
|
|||||||
m_sQueueSample.m_nFrequency = 11 * m_sQueueSample.m_nFrequency / 10;
|
m_sQueueSample.m_nFrequency = 11 * m_sQueueSample.m_nFrequency / 10;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
m_sQueueSample.m_nVolume = ComputeVolume(emittingVol, 50.f, m_sQueueSample.m_fDistance);
|
m_sQueueSample.m_nVolume = ComputeVolume(emittingVol, intensity, m_sQueueSample.m_fDistance);
|
||||||
if (!m_sQueueSample.m_nVolume)
|
if (!m_sQueueSample.m_nVolume)
|
||||||
return true;
|
return true;
|
||||||
m_sQueueSample.m_nCounter = 40;
|
m_sQueueSample.m_nCounter = 40;
|
||||||
@ -2511,7 +2511,7 @@ cAudioManager::ProcessBoatEngine(cVehicleParams& params)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
CalculateDistance(params.m_bDistanceCalculated, params.m_fDistance);
|
CalculateDistance(params.m_bDistanceCalculated, params.m_fDistance);
|
||||||
m_sQueueSample.m_nVolume = ComputeVolume(emittingVol, 50.f, m_sQueueSample.m_fDistance);
|
m_sQueueSample.m_nVolume = ComputeVolume(emittingVol, intensity, m_sQueueSample.m_fDistance);
|
||||||
if (!m_sQueueSample.m_nVolume)
|
if (!m_sQueueSample.m_nVolume)
|
||||||
return true;
|
return true;
|
||||||
m_sQueueSample.m_nFrequency += (m_sQueueSample.m_nEntityIndex * 65536) % 1000;
|
m_sQueueSample.m_nFrequency += (m_sQueueSample.m_nEntityIndex * 65536) % 1000;
|
||||||
|
Loading…
Reference in New Issue
Block a user