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