diff options
Diffstat (limited to 'src/audio/AudioLogic.cpp')
-rw-r--r-- | src/audio/AudioLogic.cpp | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/src/audio/AudioLogic.cpp b/src/audio/AudioLogic.cpp index 98ebf0d8..43736342 100644 --- a/src/audio/AudioLogic.cpp +++ b/src/audio/AudioLogic.cpp @@ -293,6 +293,18 @@ cAudioManager::CalculateDistance(bool &distCalculated, float dist) } } +CVehicle *cAudioManager::FindVehicleOfPlayer() +{ + CVehicle* vehicle = FindPlayerVehicle(); + CPlayerPed* ped = FindPlayerPed(); + if (vehicle == nil && ped != nil) { + CEntity *attachedTo = ped->m_attachedTo; + if (attachedTo && attachedTo->IsVehicle()) + vehicle = (CVehicle*)attachedTo; + } + return vehicle; +} + void cAudioManager::ProcessSpecial() { @@ -3816,6 +3828,25 @@ cAudioManager::ProcessPedOneShots(cPedParams *params) } void +cAudioManager::SetPedTalkingStatus(CPed *ped, uint8 status) +{ + if (ped != nil) + ped->m_canTalk = status; +} + +void +cAudioManager::SetPlayersMood(uint8 mood, int32 time) +{ + if (!m_bIsInitialised) return; + + if (mood < 4) { + m_bPlayerMood = mood; + field_4B34 = CTimer::GetTimeInMilliseconds() + time; + } + +} + +void cAudioManager::SetupPedComments(cPedParams *params, uint32 sound) { CPed *ped = params->m_pPed; |