Handcuffed AICharacters can't climb ladders

This commit is contained in:
Joonas Rikkonen
2017-08-08 21:17:32 +03:00
parent 0159cc3f25
commit a8ec821382
2 changed files with 4 additions and 3 deletions
@@ -137,9 +137,10 @@ namespace Barotrauma
}
if (currentPath.CurrentNode!= null && currentPath.CurrentNode.Ladders!=null)
if (currentPath.CurrentNode != null && currentPath.CurrentNode.Ladders != null)
{
if (character.SelectedConstruction != currentPath.CurrentNode.Ladders.Item && currentPath.CurrentNode.Ladders.Item.IsInsideTrigger(character.WorldPosition))
if (character.SelectedConstruction != currentPath.CurrentNode.Ladders.Item &&
currentPath.CurrentNode.Ladders.Item.IsInsideTrigger(character.WorldPosition))
{
currentPath.CurrentNode.Ladders.Item.TryInteract(character, false, true);
}
@@ -12,7 +12,7 @@ namespace Barotrauma.Items.Components
public override bool Select(Character character)
{
if (character == null) return false;
if (character == null || character.LockHands) return false;
character.AnimController.Anim = AnimController.Animation.Climbing;
//picker.SelectedConstruction = item;