(afed4e8fa) Check that the container is in the same hull than the character before allowing to contain items. Might solve the floating diving suit mentioned in #1362.
This commit is contained in:
+1
-3
@@ -113,14 +113,12 @@ namespace Barotrauma
|
||||
}
|
||||
else
|
||||
{
|
||||
if (Vector2.Distance(character.Position, container.Item.Position) > container.Item.InteractDistance
|
||||
&& !container.Item.IsInsideTrigger(character.WorldPosition))
|
||||
if (container.Item.CurrentHull != character.CurrentHull || (Vector2.Distance(character.Position, container.Item.Position) > container.Item.InteractDistance && !container.Item.IsInsideTrigger(character.WorldPosition)))
|
||||
{
|
||||
goToObjective = new AIObjectiveGoTo(container.Item, character);
|
||||
AddSubObjective(goToObjective);
|
||||
return;
|
||||
}
|
||||
|
||||
container.Combine(itemToContain);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user