Item.Container bugfix (affected at least railguns in MP), merged the "your crew has died" message box with shiftsummary, reliable reactor syncing, prevent artifacts dropping out of the level
This commit is contained in:
@@ -52,7 +52,7 @@ namespace Barotrauma
|
||||
return;
|
||||
}
|
||||
|
||||
if (container.Item.inventory == character.Inventory)
|
||||
if (container.Item.Inventory == character.Inventory)
|
||||
{
|
||||
var containedItems = container.Inventory.Items;
|
||||
//if there's already something in the mask (empty oxygen tank?), drop it
|
||||
|
||||
@@ -102,8 +102,8 @@ namespace Barotrauma
|
||||
currSearchIndex++;
|
||||
|
||||
if (!Item.ItemList[currSearchIndex].HasTag(itemName) && Item.ItemList[currSearchIndex].Name != itemName) continue;
|
||||
if (IgnoreContainedItems && Item.ItemList[currSearchIndex].container != null) continue;
|
||||
if (Item.ItemList[currSearchIndex].inventory is CharacterInventory) continue;
|
||||
if (IgnoreContainedItems && Item.ItemList[currSearchIndex].Container != null) continue;
|
||||
if (Item.ItemList[currSearchIndex].Inventory is CharacterInventory) continue;
|
||||
|
||||
targetItem = Item.ItemList[currSearchIndex];
|
||||
|
||||
@@ -119,9 +119,9 @@ namespace Barotrauma
|
||||
private void AddGoToObjective(Item item)
|
||||
{
|
||||
Item moveToTarget = item;
|
||||
while (moveToTarget.container != null)
|
||||
while (moveToTarget.Container != null)
|
||||
{
|
||||
moveToTarget = moveToTarget.container;
|
||||
moveToTarget = moveToTarget.Container;
|
||||
}
|
||||
|
||||
AddSubObjective(new AIObjectiveGoTo(moveToTarget, character));
|
||||
|
||||
@@ -968,7 +968,7 @@ namespace Barotrauma
|
||||
{
|
||||
if (!Enabled) return;
|
||||
|
||||
Vector2 pos = AnimController.Limbs[0].WorldPosition;
|
||||
Vector2 pos = DrawPosition;
|
||||
pos.Y = -pos.Y;
|
||||
|
||||
if (this == controlled) return;
|
||||
@@ -992,7 +992,7 @@ namespace Barotrauma
|
||||
|
||||
if (isDead) return;
|
||||
|
||||
Vector2 healthBarPos = new Vector2(DrawPosition.X - 50, -DrawPosition.Y - 100.0f);
|
||||
Vector2 healthBarPos = new Vector2(pos.X - 50, pos.Y - 100.0f);
|
||||
GUI.DrawRectangle(spriteBatch, new Rectangle((int)healthBarPos.X - 2, (int)healthBarPos.Y - 2, 100 + 4, 15 + 4), Color.Black, false);
|
||||
GUI.DrawRectangle(spriteBatch, new Rectangle((int)healthBarPos.X, (int)healthBarPos.Y, (int)(100.0f * (health / maxHealth)), 15), Color.Red, true);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user