Additional cargo isn't spawned in shuttles, fixed exception if trying to spawn additional cargo in a sub with no cargo spawnpoint, netlobby chatMsgBox stays selected after sending a chat message
This commit is contained in:
@@ -963,9 +963,18 @@ namespace Barotrauma.Networking
|
||||
}
|
||||
}
|
||||
|
||||
foreach (Submarine sub in Submarine.Loaded)
|
||||
foreach (Submarine sub in Submarine.MainSubs)
|
||||
{
|
||||
if (sub == null) continue;
|
||||
|
||||
WayPoint cargoSpawnPos = WayPoint.GetRandom(SpawnType.Cargo, null, sub);
|
||||
|
||||
if (cargoSpawnPos == null)
|
||||
{
|
||||
DebugConsole.ThrowError("Couldn't spawn additional cargo (cargo spawnpoint now found)");
|
||||
continue;
|
||||
}
|
||||
|
||||
var cargoRoom = cargoSpawnPos.CurrentHull;
|
||||
Vector2 position = new Vector2(
|
||||
cargoSpawnPos.Position.X + Rand.Range(-20.0f, 20.0f, false),
|
||||
@@ -980,7 +989,7 @@ namespace Barotrauma.Networking
|
||||
{
|
||||
Item.Spawner.QueueItem(itemPrefab, position, sub, false);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -251,8 +251,8 @@ namespace Barotrauma.Networking
|
||||
if (string.IsNullOrWhiteSpace(message)) return false;
|
||||
|
||||
SendChatMessage(message);
|
||||
|
||||
textBox.Deselect();
|
||||
|
||||
if (textBox == chatMsgBox) textBox.Deselect();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user