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:
Regalis
2016-10-09 17:33:51 +03:00
parent f4c5c5e542
commit f7e98ee6a8
4 changed files with 10 additions and 10 deletions
@@ -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();