- items can be equipped/unequipped by double clicking

- items inside the respawn shuttle
- using the teleport method when moving a character into or out from a sub
- removing dropped items from the respawn shuttle when respawning
This commit is contained in:
Regalis
2016-07-29 21:22:08 +03:00
parent 4252f4b9d0
commit 1a0451d0a8
4 changed files with 36 additions and 7 deletions

View File

@@ -586,18 +586,18 @@ namespace Barotrauma
if (Gap.FindAdjacent(currentHull.ConnectedGaps, findPos, 150.0f) != null) return;
Teleport(ConvertUnits.ToSimUnits(currentHull.Submarine.Position), currentHull.Submarine.Velocity, true);
Teleport(ConvertUnits.ToSimUnits(currentHull.Submarine.Position), currentHull.Submarine.Velocity);
}
//out -> in
else if (currentHull == null && newHull.Submarine != null)
{
Teleport(-ConvertUnits.ToSimUnits(newHull.Submarine.Position), -newHull.Submarine.Velocity, false);
Teleport(-ConvertUnits.ToSimUnits(newHull.Submarine.Position), -newHull.Submarine.Velocity);
}
//from one sub to another
else if (newHull != null && currentHull != null && newHull.Submarine != currentHull.Submarine)
{
Teleport(ConvertUnits.ToSimUnits(currentHull.Submarine.Position - newHull.Submarine.Position),
Vector2.Zero, false);
Vector2.Zero);
}
}
@@ -608,7 +608,7 @@ namespace Barotrauma
UpdateCollisionCategories();
}
private void Teleport(Vector2 moveAmount, Vector2 velocityChange, bool inToOut)
public void Teleport(Vector2 moveAmount, Vector2 velocityChange)
{
foreach (Limb limb in Limbs)
{