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);
|
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;
|
var cargoRoom = cargoSpawnPos.CurrentHull;
|
||||||
Vector2 position = new Vector2(
|
Vector2 position = new Vector2(
|
||||||
cargoSpawnPos.Position.X + Rand.Range(-20.0f, 20.0f, false),
|
cargoSpawnPos.Position.X + Rand.Range(-20.0f, 20.0f, false),
|
||||||
|
|||||||
@@ -252,7 +252,7 @@ namespace Barotrauma.Networking
|
|||||||
|
|
||||||
SendChatMessage(message);
|
SendChatMessage(message);
|
||||||
|
|
||||||
textBox.Deselect();
|
if (textBox == chatMsgBox) textBox.Deselect();
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user