From 7aca08a954d503bab2e2453c877e63d0b3fa2ca9 Mon Sep 17 00:00:00 2001 From: Sergeanur Date: Thu, 10 Sep 2020 00:32:51 +0300 Subject: player mood enum --- src/audio/AudioLogic.cpp | 6 +++--- src/audio/AudioManager.h | 4 ++-- src/audio/audio_enums.h | 9 +++++++++ 3 files changed, 14 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/audio/AudioLogic.cpp b/src/audio/AudioLogic.cpp index 43736342..ac81523c 100644 --- a/src/audio/AudioLogic.cpp +++ b/src/audio/AudioLogic.cpp @@ -3839,9 +3839,9 @@ cAudioManager::SetPlayersMood(uint8 mood, int32 time) { if (!m_bIsInitialised) return; - if (mood < 4) { - m_bPlayerMood = mood; - field_4B34 = CTimer::GetTimeInMilliseconds() + time; + if (mood < MAX_PLAYER_MOODS) { + m_nPlayerMood = mood; + m_nPlayerMoodTimer = CTimer::GetTimeInMilliseconds() + time; } } diff --git a/src/audio/AudioManager.h b/src/audio/AudioManager.h index 084f689b..3c6bdcfd 100644 --- a/src/audio/AudioManager.h +++ b/src/audio/AudioManager.h @@ -197,8 +197,8 @@ public: // miami uint8 m_bIsPlayerShutUp; - uint8 m_bPlayerMood; - uint32 field_4B34; + uint8 m_PlayerMood; + uint32 m_nPlayerMoodTimer; uint8 field_rest[4]; uint8 field_4B3C; diff --git a/src/audio/audio_enums.h b/src/audio/audio_enums.h index 3c616270..65094555 100644 --- a/src/audio/audio_enums.h +++ b/src/audio/audio_enums.h @@ -27,6 +27,15 @@ enum eMusicMode MUSICMODE_DISABLED, }; +enum ePlayerMood +{ + PLAYER_MOOD_CALM = 0, + PLAYER_MOOD_PISSED_OFF, + PLAYER_MOOD_ANGRY, + PLAYER_MOOD_WISECRACKING, + MAX_PLAYER_MOODS, +}; + enum eStreamedSounds { STREAMED_SOUND_RADIO_WILD, -- cgit v1.2.3