Changed GUIMessageBox.MessageBoxes from a queue to a list to make it easier to remove messageboxes that aren't currently visible, fixed clients creating multiple "permissions changed" messageboxes if there's another messagebox on the screen
This commit is contained in:
@@ -587,14 +587,7 @@ namespace Barotrauma.Networking
|
||||
|
||||
private void SetPermissions(ClientPermissions newPermissions)
|
||||
{
|
||||
if (GUIMessageBox.MessageBoxes.Count > 0)
|
||||
{
|
||||
var existingMsgBox = GUIMessageBox.MessageBoxes.Peek();
|
||||
if (existingMsgBox.UserData as string == "permissions")
|
||||
{
|
||||
GUIMessageBox.MessageBoxes.Dequeue();
|
||||
}
|
||||
}
|
||||
GUIMessageBox.MessageBoxes.RemoveAll(mb => mb.UserData as string == "permissions");
|
||||
|
||||
string msg = "";
|
||||
if (newPermissions == ClientPermissions.None)
|
||||
|
||||
Reference in New Issue
Block a user