diff options
author | Sergeanur <s.anureev@yandex.ua> | 2020-09-09 18:37:44 +0200 |
---|---|---|
committer | Sergeanur <s.anureev@yandex.ua> | 2020-09-09 18:37:44 +0200 |
commit | 4f4b1f914540465a77aa8daf7e837042a96b3e31 (patch) | |
tree | 56fe4ae390e58e8a0d8f39ce555a382bdf635bbe /src/audio/AudioLogic.cpp | |
parent | More stinger fix (diff) | |
download | re3-4f4b1f914540465a77aa8daf7e837042a96b3e31.tar re3-4f4b1f914540465a77aa8daf7e837042a96b3e31.tar.gz re3-4f4b1f914540465a77aa8daf7e837042a96b3e31.tar.bz2 re3-4f4b1f914540465a77aa8daf7e837042a96b3e31.tar.lz re3-4f4b1f914540465a77aa8daf7e837042a96b3e31.tar.xz re3-4f4b1f914540465a77aa8daf7e837042a96b3e31.tar.zst re3-4f4b1f914540465a77aa8daf7e837042a96b3e31.zip |
Diffstat (limited to '')
-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; |