diff options
author | Sergeanur <s.anureev@yandex.ua> | 2020-09-09 23:32:51 +0200 |
---|---|---|
committer | Sergeanur <s.anureev@yandex.ua> | 2020-09-09 23:32:51 +0200 |
commit | 7aca08a954d503bab2e2453c877e63d0b3fa2ca9 (patch) | |
tree | 74560a42890068c25e181b34b9876184b085eaa2 /src/audio | |
parent | Fix crash on assert (diff) | |
download | re3-7aca08a954d503bab2e2453c877e63d0b3fa2ca9.tar re3-7aca08a954d503bab2e2453c877e63d0b3fa2ca9.tar.gz re3-7aca08a954d503bab2e2453c877e63d0b3fa2ca9.tar.bz2 re3-7aca08a954d503bab2e2453c877e63d0b3fa2ca9.tar.lz re3-7aca08a954d503bab2e2453c877e63d0b3fa2ca9.tar.xz re3-7aca08a954d503bab2e2453c877e63d0b3fa2ca9.tar.zst re3-7aca08a954d503bab2e2453c877e63d0b3fa2ca9.zip |
Diffstat (limited to '')
-rw-r--r-- | src/audio/AudioLogic.cpp | 6 | ||||
-rw-r--r-- | src/audio/AudioManager.h | 4 | ||||
-rw-r--r-- | src/audio/audio_enums.h | 9 |
3 files changed, 14 insertions, 5 deletions
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, |