From 5dc410a999f02f1e90c991c9de617bb2b1dc6bbc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?eray=20or=C3=A7unus?= Date: Wed, 3 Jun 2020 16:16:31 +0300 Subject: Peds, eSound and PedState enum, fixes --- src/vehicles/Automobile.cpp | 17 ++++++----------- src/vehicles/Bike.h | 2 +- src/vehicles/Train.cpp | 4 ++-- 3 files changed, 9 insertions(+), 14 deletions(-) (limited to 'src/vehicles') diff --git a/src/vehicles/Automobile.cpp b/src/vehicles/Automobile.cpp index 4ebf2737..8bf2a414 100644 --- a/src/vehicles/Automobile.cpp +++ b/src/vehicles/Automobile.cpp @@ -1447,8 +1447,7 @@ CAutomobile::ProcessControl(void) gun.FireProjectile(this, &source, 0.0f); CStats::RoundsFiredByPlayer++; -//TODO(MIAMI): -// DMAudio.PlayOneShot(m_audioEntityId, 55, 0.0f); + DMAudio.PlayOneShot(m_audioEntityId, SOUND_WEAPON_SHOT_FIRED, 0.0f); m_nGunFiringTime = CTimer::GetTimeInMilliseconds(); // Hunter gun }else if(CPad::GetPad(0)->GetHandBrake() && CTimer::GetTimeInMilliseconds() > m_nGunFiringTime+60){ @@ -1458,8 +1457,7 @@ CAutomobile::ProcessControl(void) gun.FireInstantHit(this, &source); gun.AddGunshell(this, source, CVector2D(0.0f, 0.1f), 0.025f); CStats::RoundsFiredByPlayer++; -//TODO(MIAMI): -// DMAudio.PlayOneShot(m_audioEntityId, 55, 0.0f); + DMAudio.PlayOneShot(m_audioEntityId, SOUND_WEAPON_SHOT_FIRED, 0.0f); m_nGunFiringTime = CTimer::GetTimeInMilliseconds(); } }else if(GetModelIndex() == MI_SEASPAR && GetStatus() == STATUS_PLAYER){ @@ -1471,8 +1469,7 @@ CAutomobile::ProcessControl(void) gun.FireInstantHit(this, &source); gun.AddGunshell(this, source, CVector2D(0.0f, 0.1f), 0.025f); CStats::RoundsFiredByPlayer++; -//TODO(MIAMI): -// DMAudio.PlayOneShot(m_audioEntityId, 55, 0.0f); + DMAudio.PlayOneShot(m_audioEntityId, SOUND_WEAPON_SHOT_FIRED, 0.0f); m_nGunFiringTime = CTimer::GetTimeInMilliseconds(); } } @@ -3032,7 +3029,7 @@ CAutomobile::ProcessControlInputs(uint8 pad) if(!CPad::GetPad(pad)->GetExitVehicle() || pDriver && pDriver->m_pVehicleAnim && (pDriver->m_pVehicleAnim->animId == ANIM_CAR_ROLLOUT_LHS || - pDriver->m_pVehicleAnim->animId == ANIM_CAR_ROLLOUT_LHS2)) + pDriver->m_pVehicleAnim->animId == ANIM_CAR_ROLLOUT_RHS)) bIsHandbrakeOn = !!CPad::GetPad(pad)->GetHandBrake(); else bIsHandbrakeOn = true; @@ -4838,8 +4835,7 @@ CAutomobile::BurstTyre(uint8 wheel, bool applyForces) if(status == WHEEL_STATUS_OK){ Damage.SetWheelStatus(wheel, WHEEL_STATUS_BURST); CStats::TyresPopped++; -// TODO(MIAMI) -// DMAudio.PlayOneShot(m_audioEntityId, SOUND_15, 0.0f); + DMAudio.PlayOneShot(m_audioEntityId, SOUND_CAR_TYRE_POP, 0.0f); if(GetStatus() == STATUS_SIMPLE){ SetStatus(STATUS_PHYSICS); @@ -5411,8 +5407,7 @@ CAutomobile::SetPanelDamage(int32 component, ePanels panel, bool noFlyingCompone if(m_aCarNodes[component] == nil) return; if(status == PANEL_STATUS_SMASHED1){ -// TODO(MIAMI) -// DMAudio.PlayOneShot(m_audioEntityId, SOUND_12, 0.0f); + DMAudio.PlayOneShot(m_audioEntityId, SOUND_CAR_WINDSHIELD_CRACK, 0.0f); // show damaged part SetComponentVisibility(m_aCarNodes[component], ATOMIC_FLAG_DAM); }else if(status == PANEL_STATUS_MISSING){ diff --git a/src/vehicles/Bike.h b/src/vehicles/Bike.h index ba93fda0..c524a89c 100644 --- a/src/vehicles/Bike.h +++ b/src/vehicles/Bike.h @@ -36,7 +36,7 @@ public: CVector wheelieNormal; CVector wheelieRight; tBikeHandlingData *pBikeHandling; - int32 m_bikeAnimType; + AssocGroupId m_bikeAnimType; uint8 m_wheelStatus[2]; CColPoint m_aWheelColPoints[4]; float m_aSuspensionSpringRatio[4]; diff --git a/src/vehicles/Train.cpp b/src/vehicles/Train.cpp index 5dab70c5..550c02a5 100644 --- a/src/vehicles/Train.cpp +++ b/src/vehicles/Train.cpp @@ -204,7 +204,7 @@ CTrain::ProcessControl(void) if(m_bTrainStopping){ m_nDoorTimer = CTimer::GetTimeInMilliseconds() + 1000; m_nDoorState = TRAIN_DOOR_OPENING; - DMAudio.PlayOneShot(m_audioEntityId, SOUND_18, 0.0f); + DMAudio.PlayOneShot(m_audioEntityId, SOUND_TRAIN_DOOR_CLOSE, 0.0f); } break; @@ -221,7 +221,7 @@ CTrain::ProcessControl(void) if(!m_bTrainStopping){ m_nDoorTimer = CTimer::GetTimeInMilliseconds() + 1000; m_nDoorState = TRAIN_DOOR_CLOSING; - DMAudio.PlayOneShot(m_audioEntityId, SOUND_19, 0.0f); + DMAudio.PlayOneShot(m_audioEntityId, SOUND_TRAIN_DOOR_OPEN, 0.0f); } break; -- cgit v1.2.3