mhgvik
This commit is contained in:
@@ -31,6 +31,11 @@ namespace Barotrauma
|
||||
|
||||
var pathSteering = character.AIController.SteeringManager as IndoorsSteeringManager;
|
||||
|
||||
if (pathSteering==null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (newTargetTimer <= 0.0f)
|
||||
{
|
||||
currentTarget = FindRandomTarget();
|
||||
|
||||
@@ -317,7 +317,7 @@ namespace Barotrauma.Items.Components
|
||||
return;
|
||||
}
|
||||
|
||||
Vector2 pos = new Vector2(item.Rect.Center.X, -item.Rect.Y);
|
||||
Vector2 pos = new Vector2(item.Rect.Center.X, item.Rect.Y);
|
||||
if (item.Submarine != null) pos += item.Submarine.Position;
|
||||
pos.Y = -pos.Y;
|
||||
|
||||
|
||||
@@ -389,9 +389,19 @@ namespace Barotrauma
|
||||
Limb limb = f2.Body.UserData as Limb;
|
||||
if (limb!=null && limb.character.Submarine==null)
|
||||
{
|
||||
var ragdoll = limb.character.AnimController;
|
||||
ragdoll.SetPosition(ragdoll.RefLimb.Position - body.Position);
|
||||
limb.character.Submarine = submarine;
|
||||
Vector2 normal2;
|
||||
FixedArray2<Vector2> points;
|
||||
contact.GetWorldManifold(out normal2, out points);
|
||||
|
||||
if (Submarine.PickBody(points[0] - ConvertUnits.ToSimUnits(submarine.Position), points[0] - ConvertUnits.ToSimUnits(submarine.Position) - normal2, null, Physics.CollisionWall) != null)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
//var ragdoll = limb.character.AnimController;
|
||||
//ragdoll.SetPosition(ragdoll.RefLimb.Position - body.Position);
|
||||
//limb.character.Submarine = submarine;
|
||||
}
|
||||
|
||||
return true;
|
||||
|
||||
Binary file not shown.
Reference in New Issue
Block a user