diff --git a/Sources/Entities/Elemental.es b/Sources/Entities/Elemental.es index c5b4194..16efed6 100644 --- a/Sources/Entities/Elemental.es +++ b/Sources/Entities/Elemental.es @@ -1324,7 +1324,7 @@ procedures: autocall FallOnFloor() EReturn; } - if (m_EecChar==ELC_LARGE || (m_EecChar==ELC_BIG && m_EetType==ELT_LAVA)) + if ((m_EecChar==ELC_LARGE || m_EecChar==ELC_BIG) && m_EetType==ELT_LAVA) { PlaySound(m_soBackground, SOUND_LAVA_LAVABURN, SOF_3D|SOF_LOOP); } diff --git a/Sources/EntitiesMP/Elemental.es b/Sources/EntitiesMP/Elemental.es index 1c65808..2d155d8 100644 --- a/Sources/EntitiesMP/Elemental.es +++ b/Sources/EntitiesMP/Elemental.es @@ -1373,7 +1373,7 @@ procedures: autocall FallOnFloor() EReturn; } - if (m_EecChar==ELC_LARGE || (m_EecChar==ELC_BIG && m_EetType==ELT_LAVA)) + if ((m_EecChar==ELC_LARGE || m_EecChar==ELC_BIG) && m_EetType==ELT_LAVA) { PlaySound(m_soBackground, SOUND_LAVA_LAVABURN, SOF_3D|SOF_LOOP); } diff --git a/Sources/GameMP/Computer.cpp b/Sources/GameMP/Computer.cpp index 60bf3cc..8a899d7 100644 --- a/Sources/GameMP/Computer.cpp +++ b/Sources/GameMP/Computer.cpp @@ -177,7 +177,7 @@ static PIXaabbox2D GetMsgSliderSpace(void) static PIXaabbox2D GetTextSliderBox(void) { - if (_iActiveMessage>=_acmMessages.Count()) { + if ((_iActiveMessage >= _acmMessages.Count()) || (_iActiveMessage < 0)) { return PIXaabbox2D(); } INDEX ctTextLines = _acmMessages[_iActiveMessage].cm_ctFormattedLines; @@ -246,7 +246,7 @@ void LastUnreadMessage(void) // go to next/previous message void PrevMessage(void) { - if (_iActiveMessage >= _acmMessages.Count()) { + if ((_iActiveMessage >= _acmMessages.Count()) || (_iActiveMessage < 0)) { return; } _iActiveMessage--; @@ -258,7 +258,7 @@ void PrevMessage(void) void NextMessage(void) { - if (_iActiveMessage >= _acmMessages.Count()) { + if ((_iActiveMessage >= _acmMessages.Count()) || (_iActiveMessage < 0)) { return; } _iActiveMessage++; @@ -305,7 +305,7 @@ void MessageTextUp(INDEX ctLines) void MessageTextDn(INDEX ctLines) { // if no message do nothing - if (_iActiveMessage >= _acmMessages.Count()) { + if ((_iActiveMessage >= _acmMessages.Count()) || (_iActiveMessage < 0)) { return; } // find text lines count @@ -336,7 +336,7 @@ void MessageTextUpDn(INDEX ctLines) // mark current message as read void MarkCurrentRead(void) { - if (_iActiveMessage>=_acmMessages.Count()) { + if ((_iActiveMessage >= _acmMessages.Count()) || (_iActiveMessage < 0)) { return; } // if running in background