summaryrefslogtreecommitdiffstats
path: root/src/audio/AudioLogic.cpp
diff options
context:
space:
mode:
authorRoman Masanin <36927roma@gmail.com>2020-09-13 20:45:53 +0200
committerRoman Masanin <36927roma@gmail.com>2020-09-13 20:45:53 +0200
commit8f948228d5e60eb89055a8d40210e99e9f4f2c47 (patch)
treeee8c238c77e53e29c650d911e9d198452f5a7ba9 /src/audio/AudioLogic.cpp
parentvehicle audio(first part) and temp fix for openAL (diff)
parentMerge pull request #702 from Sergeanur/VC/MusicManager (diff)
downloadre3-8f948228d5e60eb89055a8d40210e99e9f4f2c47.tar
re3-8f948228d5e60eb89055a8d40210e99e9f4f2c47.tar.gz
re3-8f948228d5e60eb89055a8d40210e99e9f4f2c47.tar.bz2
re3-8f948228d5e60eb89055a8d40210e99e9f4f2c47.tar.lz
re3-8f948228d5e60eb89055a8d40210e99e9f4f2c47.tar.xz
re3-8f948228d5e60eb89055a8d40210e99e9f4f2c47.tar.zst
re3-8f948228d5e60eb89055a8d40210e99e9f4f2c47.zip
Diffstat (limited to 'src/audio/AudioLogic.cpp')
-rw-r--r--src/audio/AudioLogic.cpp31
1 files changed, 31 insertions, 0 deletions
diff --git a/src/audio/AudioLogic.cpp b/src/audio/AudioLogic.cpp
index 613d847c..2b9e622e 100644
--- a/src/audio/AudioLogic.cpp
+++ b/src/audio/AudioLogic.cpp
@@ -294,6 +294,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()
{
@@ -3977,6 +3989,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;