mirror of
https://gitlab.com/GaryOderNichts/re3-wiiu.git
synced 2024-12-24 16:51:49 +01:00
cleanup processVehicle
This commit is contained in:
parent
7f77e8a441
commit
5f810ff21c
@ -707,7 +707,6 @@ void cAudioManager::ProcessVehicle(CVehicle* veh)
|
|||||||
CAutomobile* automobile;
|
CAutomobile* automobile;
|
||||||
float gasPedal;
|
float gasPedal;
|
||||||
|
|
||||||
//44-58
|
|
||||||
player = FindPlayerPed();
|
player = FindPlayerPed();
|
||||||
playerVeh = FindPlayerVehicle();
|
playerVeh = FindPlayerVehicle();
|
||||||
if (playerVeh == NULL && player != NULL) {
|
if (playerVeh == NULL && player != NULL) {
|
||||||
@ -722,7 +721,6 @@ void cAudioManager::ProcessVehicle(CVehicle* veh)
|
|||||||
|| CGame::currArea == AREA_EVERYWHERE
|
|| CGame::currArea == AREA_EVERYWHERE
|
||||||
|| CGame::currArea == AREA_MALL
|
|| CGame::currArea == AREA_MALL
|
||||||
|| CGame::currArea == AREA_MAIN_MAP) {
|
|| CGame::currArea == AREA_MAIN_MAP) {
|
||||||
//62-84
|
|
||||||
m_sQueueSample.m_vecPos = veh->GetPosition();
|
m_sQueueSample.m_vecPos = veh->GetPosition();
|
||||||
params.m_bDistanceCalculated = false;
|
params.m_bDistanceCalculated = false;
|
||||||
params.m_pVehicle = veh;
|
params.m_pVehicle = veh;
|
||||||
@ -741,9 +739,8 @@ void cAudioManager::ProcessVehicle(CVehicle* veh)
|
|||||||
ProcessEngineDamage(¶ms);
|
ProcessEngineDamage(¶ms);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
//104-
|
|
||||||
switch (params.m_VehicleType) {
|
switch (params.m_VehicleType) {
|
||||||
case VEHICLE_TYPE_CAR://done
|
case VEHICLE_TYPE_CAR:
|
||||||
automobile = (CAutomobile*)veh;
|
automobile = (CAutomobile*)veh;
|
||||||
UpdateGasPedalAudio(&automobile->m_fGasPedalAudio, automobile->m_fGasPedal);
|
UpdateGasPedalAudio(&automobile->m_fGasPedalAudio, automobile->m_fGasPedal);
|
||||||
if (veh->m_modelIndex == MI_RCBANDIT || veh->m_modelIndex == MI_RCBARON) {
|
if (veh->m_modelIndex == MI_RCBANDIT || veh->m_modelIndex == MI_RCBARON) {
|
||||||
@ -786,7 +783,7 @@ void cAudioManager::ProcessVehicle(CVehicle* veh)
|
|||||||
ProcessVehicleOneShots(¶ms);
|
ProcessVehicleOneShots(¶ms);
|
||||||
automobile->m_fVelocityChangeForAudio = params.m_fVelocityChange;
|
automobile->m_fVelocityChangeForAudio = params.m_fVelocityChange;
|
||||||
break;
|
break;
|
||||||
case VEHICLE_TYPE_BOAT://done
|
case VEHICLE_TYPE_BOAT:
|
||||||
if (veh->m_modelIndex == MI_SKIMMER)
|
if (veh->m_modelIndex == MI_SKIMMER)
|
||||||
ProcessHelicopter(¶ms);
|
ProcessHelicopter(¶ms);
|
||||||
else
|
else
|
||||||
@ -794,11 +791,11 @@ void cAudioManager::ProcessVehicle(CVehicle* veh)
|
|||||||
ProcessBoatMovingOverWater(¶ms);
|
ProcessBoatMovingOverWater(¶ms);
|
||||||
ProcessVehicleOneShots(¶ms);
|
ProcessVehicleOneShots(¶ms);
|
||||||
break;
|
break;
|
||||||
case VEHICLE_TYPE_HELI: //done
|
case VEHICLE_TYPE_HELI:
|
||||||
ProcessHelicopter(¶ms); //TODO recheck
|
ProcessHelicopter(¶ms); //recheck
|
||||||
ProcessVehicleOneShots(¶ms);
|
ProcessVehicleOneShots(¶ms);
|
||||||
break;
|
break;
|
||||||
case VEHICLE_TYPE_PLANE://done
|
case VEHICLE_TYPE_PLANE:
|
||||||
switch (params.m_nIndex) {
|
switch (params.m_nIndex) {
|
||||||
case AIRTRAIN:
|
case AIRTRAIN:
|
||||||
ProcessJumbo(¶ms);//recheck
|
ProcessJumbo(¶ms);//recheck
|
||||||
@ -812,13 +809,8 @@ void cAudioManager::ProcessVehicle(CVehicle* veh)
|
|||||||
ProcessVehicleOneShots(¶ms);
|
ProcessVehicleOneShots(¶ms);
|
||||||
//ProcessVehicleFlatType(¶ms);
|
//ProcessVehicleFlatType(¶ms);
|
||||||
break;
|
break;
|
||||||
case VEHICLE_TYPE_BIKE: //done
|
case VEHICLE_TYPE_BIKE:
|
||||||
bike = (CBike*)veh;
|
bike = (CBike*)veh;
|
||||||
//gasPedal = fabs(veh->m_fGasPedal);
|
|
||||||
//if (gasPedal <= bike->m_fGasPedalAudio)
|
|
||||||
// bike->m_fGasPedalAudio = Max(bike->m_fGasPedalAudio - 0.07f, gasPedal);
|
|
||||||
//else
|
|
||||||
// bike->m_fGasPedalAudio = Min(bike->m_fGasPedalAudio + 0.09f, gasPedal);
|
|
||||||
UpdateGasPedalAudio(&bike->m_fGasPedalAudio, bike->m_fGasPedal);
|
UpdateGasPedalAudio(&bike->m_fGasPedalAudio, bike->m_fGasPedal);
|
||||||
if (ProcessVehicleRoadNoise(¶ms)) {
|
if (ProcessVehicleRoadNoise(¶ms)) {
|
||||||
if (CWeather::WetRoads > 0.0f)
|
if (CWeather::WetRoads > 0.0f)
|
||||||
|
@ -143,7 +143,7 @@ public:
|
|||||||
class cVehicleParams
|
class cVehicleParams
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
int32 m_VehicleType;
|
eVehicleType m_VehicleType;
|
||||||
bool m_bDistanceCalculated;
|
bool m_bDistanceCalculated;
|
||||||
float m_fDistance;
|
float m_fDistance;
|
||||||
CVehicle *m_pVehicle;
|
CVehicle *m_pVehicle;
|
||||||
|
Loading…
Reference in New Issue
Block a user