Additional null check in Wire Update, stopping paused sounds before deleting them (prevents an OpenAL error when switching to sub editor when the mainmenu drone sound is playing)
This commit is contained in:
@@ -239,7 +239,7 @@ namespace Barotrauma.Items.Components
|
||||
if (connections[0] != null && connections[0].Item.Submarine != null) sub = connections[0].Item.Submarine;
|
||||
if (connections[1] != null && connections[1].Item.Submarine != null) sub = connections[1].Item.Submarine;
|
||||
|
||||
if (item.Submarine != sub && Screen.Selected != GameMain.EditMapScreen)
|
||||
if ((item.Submarine != sub || sub == null) && Screen.Selected != GameMain.EditMapScreen)
|
||||
{
|
||||
ClearConnections();
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user