- disabling the collider and placing it on the torso when swimming, stunned or dead (todo: attempt to get swimming working with the collider controlling movement)
- only the collider can receive impact damage - shorter collider to allow crouching in tight spaces - AI characters are considered close enough to a waypoint if their collider overlaps with it (instead of a distance check)
This commit is contained in:
@@ -82,20 +82,20 @@ namespace Barotrauma
|
||||
Character.AnimController.IgnorePlatforms = true;
|
||||
}
|
||||
|
||||
if (Character.AnimController.Stairs != null)
|
||||
{
|
||||
float yDiff = currPath.CurrentNode.WorldPosition.Y - Character.WorldPosition.Y;
|
||||
//if (Character.AnimController.Stairs != null)
|
||||
//{
|
||||
// float yDiff = currPath.CurrentNode.WorldPosition.Y - Character.WorldPosition.Y;
|
||||
|
||||
if (Math.Abs(yDiff)>10.0f)
|
||||
{
|
||||
int dir = Math.Sign(yDiff);
|
||||
// if (Math.Abs(yDiff) > 20.0f)
|
||||
// {
|
||||
// int dir = Math.Sign(yDiff);
|
||||
|
||||
float movement = Character.AnimController.Stairs.StairDirection == Direction.Right ?
|
||||
dir * Character.AnimController.TargetMovement.Length() : -dir * Character.AnimController.TargetMovement.Length();
|
||||
// float movement = Character.AnimController.Stairs.StairDirection == Direction.Right ?
|
||||
// dir * Character.AnimController.TargetMovement.Length() : -dir * Character.AnimController.TargetMovement.Length();
|
||||
|
||||
Character.AnimController.TargetMovement = new Vector2(movement, 0.0f);
|
||||
}
|
||||
}
|
||||
// steeringManager.SteeringManual(deltaTime, new Vector2(movement*2, 0.0f));
|
||||
// }
|
||||
//}
|
||||
}
|
||||
|
||||
(Character.AnimController as HumanoidAnimController).Crouching = false;
|
||||
|
||||
Reference in New Issue
Block a user