Using TrySetLimbPosition when flipping a character to prevent limbs from going through walls, changes to outside->inside teleportation logic

This commit is contained in:
Regalis
2016-05-01 18:53:58 +03:00
parent 4cda429ab0
commit 63bb78b3ef
3 changed files with 20 additions and 4 deletions

View File

@@ -503,7 +503,17 @@ namespace Barotrauma
public virtual Hull FindHull()
{
if (parentInventory != null && (parentInventory.Owner as Character) != null)
{
CurrentHull = (parentInventory.Owner as Character).AnimController.CurrentHull;
body.Submarine = (parentInventory.Owner as Character).Submarine;
return CurrentHull;
}
CurrentHull = Hull.FindHull(WorldPosition, CurrentHull);
if (body!=null)
{
body.Submarine = CurrentHull == null ? null : Submarine.Loaded;