- teleporting from sub to another works now
- repairtool fix - submarines collide with each other - every submarine is updated (so MainSub isn't the only one that can move) - submarinebody vertex generation fix
This commit is contained in:
@@ -76,10 +76,13 @@ namespace Barotrauma
|
||||
|
||||
currentTarget = target;
|
||||
Vector2 pos = host.SimPosition;
|
||||
if (character!=null && character.Submarine==null)
|
||||
if (character != null && character.Submarine == null)
|
||||
{
|
||||
//todo: take multiple subs into account
|
||||
pos -= Submarine.MainSub.SimPosition;
|
||||
var targetHull = Hull.FindHull(FarseerPhysics.ConvertUnits.ToDisplayUnits(target), null, false);
|
||||
if (targetHull!=null && targetHull.Submarine != null)
|
||||
{
|
||||
pos -= targetHull.SimPosition;
|
||||
}
|
||||
}
|
||||
|
||||
currentPath = pathFinder.FindPath(pos, target);
|
||||
|
||||
Reference in New Issue
Block a user