diff options
author | Sergeanur <s.anureev@yandex.ua> | 2020-09-13 02:10:14 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-09-13 02:10:14 +0200 |
commit | 25a22cc6f25c01c7fc777bc41f632e6237ac8426 (patch) | |
tree | 4323944c27801c403fcea94a4fee9913570b172e /src/audio/AudioLogic.cpp | |
parent | Merge pull request #701 from erorcun/miami (diff) | |
parent | Add missing file (diff) | |
download | re3-25a22cc6f25c01c7fc777bc41f632e6237ac8426.tar re3-25a22cc6f25c01c7fc777bc41f632e6237ac8426.tar.gz re3-25a22cc6f25c01c7fc777bc41f632e6237ac8426.tar.bz2 re3-25a22cc6f25c01c7fc777bc41f632e6237ac8426.tar.lz re3-25a22cc6f25c01c7fc777bc41f632e6237ac8426.tar.xz re3-25a22cc6f25c01c7fc777bc41f632e6237ac8426.tar.zst re3-25a22cc6f25c01c7fc777bc41f632e6237ac8426.zip |
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..ac81523c 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 < MAX_PLAYER_MOODS) { + m_nPlayerMood = mood; + m_nPlayerMoodTimer = CTimer::GetTimeInMilliseconds() + time; + } + +} + +void cAudioManager::SetupPedComments(cPedParams *params, uint32 sound) { CPed *ped = params->m_pPed; |