(4b07ea1ca) Removed unused method from HumanoidAnimController

This commit is contained in:
Joonas Rikkonen
2019-04-08 19:16:51 +03:00
parent 63971c90a9
commit 5876097da4
3 changed files with 1 additions and 85 deletions

View File

@@ -276,9 +276,6 @@ namespace Barotrauma
characterInfos.Add(characterInfo);
}
characterInfos.Add(characterInfo);
}
/// <summary>
/// Remove the character from the crew (and crew menus).
/// </summary>

View File

@@ -800,53 +800,7 @@ namespace Barotrauma
Collider.LinearVelocity.Y > 0.0f ? Collider.LinearVelocity.Y * 0.5f : Collider.LinearVelocity.Y);
}
}
private void ClimbOverObstacles()
{
if (Collider.FarseerBody.ContactList == null || Math.Abs(movement.X) < 0.01f) return;
//check if the collider is touching a suitable obstacle to climb over
Vector2? handle = null;
FarseerPhysics.Dynamics.Contacts.ContactEdge ce = Collider.FarseerBody.ContactList;
while (ce != null && ce.Contact != null)
{
if (ce.Contact.Enabled && ce.Contact.IsTouching && ce.Contact.FixtureA.CollisionCategories.HasFlag(Physics.CollisionWall))
{
Vector2 contactNormal;
FarseerPhysics.Common.FixedArray2<Vector2> contactPos;
ce.Contact.GetWorldManifold(out contactNormal, out contactPos);
//only climb if moving towards the obstacle
if (Math.Sign(contactPos[0].X - Collider.SimPosition.X) == Math.Sign(movement.X) &&
(handle == null || contactPos[0].Y > ((Vector2)handle).Y))
{
handle = contactPos[0];
}
}
ce = ce.Next;
}
if (handle == null) return;
float colliderBottomY = GetColliderBottom().Y;
//the contact point should be higher than the bottom of the collider
if (((Vector2)handle).Y < colliderBottomY + 0.01f ||
((Vector2)handle).Y > Collider.SimPosition.Y) return;
//find the height of the floor below the torso
//(if moving towards towards an obstacle that's low enough to climb over, the torso should be above it)
float obstacleY = GetFloorY(GetLimb(LimbType.Torso));
if (obstacleY > colliderBottomY)
{
//higher vertical velocity for taller obstacles
Collider.LinearVelocity += Vector2.UnitY * (((Vector2)handle).Y - colliderBottomY + 0.01f) * 50;
onGround = true;
}
}
private float handCyclePos;
private float legCyclePos;
void UpdateSwimming()

View File

@@ -153,41 +153,6 @@ namespace Barotrauma
get { return binding; }
}
public void SetState()
{
hit = binding.IsHit();
if (hit) hitQueue = true;
held = binding.IsDown();
if (held) heldQueue = true;
}
#endif
public void SetState()
{
hit = binding.IsHit();
if (hit) hitQueue = true;
held = binding.IsDown();
if (held) heldQueue = true;
}
#endif
public KeyOrMouse State
{
get { return binding; }
}
public void SetState()
{
hit = binding.IsHit();
if (hit) hitQueue = true;
held = binding.IsDown();
if (held) heldQueue = true;
}
#endif
public void SetState()
{
hit = binding.IsHit();