Fix tab list sometimes not updating after a player leaves. (#3280)
When a player leaves the game, their client handle has its state changed to csDestroyed. This should fix issue #3138
This commit is contained in:
parent
9e52982f0e
commit
320d1c6151
@ -2548,7 +2548,7 @@ void cWorld::BroadcastPlayerListRemovePlayer(const cPlayer & a_Player, const cCl
|
|||||||
for (cPlayerList::iterator itr = m_Players.begin(); itr != m_Players.end(); ++itr)
|
for (cPlayerList::iterator itr = m_Players.begin(); itr != m_Players.end(); ++itr)
|
||||||
{
|
{
|
||||||
cClientHandle * ch = (*itr)->GetClientHandle();
|
cClientHandle * ch = (*itr)->GetClientHandle();
|
||||||
if ((ch == a_Exclude) || (ch == nullptr) || !ch->IsLoggedIn() || ch->IsDestroyed())
|
if ((ch == a_Exclude) || (ch == nullptr) || !ch->IsLoggedIn())
|
||||||
{
|
{
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user