Cargo spawning fix again: items are spawned slightly above the bottom of the cargo room (because the item is only inside the hull if pos.Y > hull.rect.bottom)
This commit is contained in:
@@ -70,7 +70,7 @@ namespace Barotrauma
|
||||
|
||||
Vector2 position = new Vector2(
|
||||
cargoSpawnPos.Position.X + Rand.Range(-20.0f, 20.0f, false),
|
||||
cargoRoom.Rect.Y - cargoRoom.Rect.Height);
|
||||
cargoRoom.Rect.Y - cargoRoom.Rect.Height + itemPrefab.Size.Y / 2);
|
||||
|
||||
var item = new Item(itemPrefab, position, cargoRoom.Submarine);
|
||||
item.FindHull();
|
||||
|
||||
Reference in New Issue
Block a user