A player's inventory is always opened by its owner. (#4176)
Fixes #4093 Window updates are only broadcast to players in the m_OpenedBy list. Normally players are added after sending a window open packet but no packet is sent for a player's inventory. This meant broadcasts were never sent for the inventory window.
This commit is contained in:
parent
95108c134d
commit
f0c735e846
@ -328,11 +328,13 @@ bool cWindow::ClosedByPlayer(cPlayer & a_Player, bool a_CanRefuse)
|
|||||||
(*itr)->OnPlayerRemoved(a_Player);
|
(*itr)->OnPlayerRemoved(a_Player);
|
||||||
} // for itr - m_SlotAreas[]
|
} // for itr - m_SlotAreas[]
|
||||||
|
|
||||||
m_OpenedBy.remove(&a_Player);
|
if (m_WindowType != wtInventory)
|
||||||
|
|
||||||
if ((m_WindowType != wtInventory) && m_OpenedBy.empty())
|
|
||||||
{
|
{
|
||||||
Destroy();
|
m_OpenedBy.remove(&a_Player);
|
||||||
|
if (m_OpenedBy.empty())
|
||||||
|
{
|
||||||
|
Destroy();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (m_IsDestroyed)
|
if (m_IsDestroyed)
|
||||||
|
Loading…
Reference in New Issue
Block a user