diff --git a/amxmodx/CEvent.cpp b/amxmodx/CEvent.cpp index 92791c62..f34909c2 100755 --- a/amxmodx/CEvent.cpp +++ b/amxmodx/CEvent.cpp @@ -237,31 +237,11 @@ void EventsMngr::parserInit(int msg_type, float* timer, CPlayer* pPlayer, int in if (pPlayer) { - // seriously who writes an if statement like this - // if (!(*iter).m_FlagPlayer || (pPlayer->IsAlive() ? !(*iter).m_FlagAlive : !(*iter).m_FlagDead)) - if (!(*iter).m_FlagPlayer) + if (!(*iter).m_FlagPlayer || (pPlayer->IsAlive() ? !(*iter).m_FlagAlive : !(*iter).m_FlagDead)) { (*iter).m_Done = true; continue; } - else if ((*iter).m_FlagAlive) // can only be sent to an alive user - { - if (!pPlayer->IsAlive() || - !pPlayer->ingame) // fix for amb149 - is_user_alive checks ingame status, so this should too - { - (*iter).m_Done = true; - continue; - } - } - else if ((*iter).m_FlagDead) // can only be sent to "dead" users - { - if (pPlayer->IsAlive() && - pPlayer->ingame) // added to compliment amb149 fix: check both incase there is stale health data - { - (*iter).m_Done = true; - continue; - } - } } else if (!(*iter).m_FlagWorld) { diff --git a/plugins/include/amxmodx.inc b/plugins/include/amxmodx.inc index 4b0ea66c..1f7f987e 100755 --- a/plugins/include/amxmodx.inc +++ b/plugins/include/amxmodx.inc @@ -116,6 +116,8 @@ native console_cmd(id,const cmd[],any:...); * "c" - send only once when repeated to other players. * "d" - call if is send to dead player. * "e" - to alive. +* NOTE: Due to a long-standing bug that would break compatibility with old plugins, +* the client id should be checked for alive/dead state if you use d or e. * Examples for conditions: * "2=c4" - 2nd parameter of message must be sting "c4". * "3>10" - 3rd parameter must be greater then 10.