(771621c77) Added: Delays for medical & flooding tutorials, resetting of injuredmember when starting again

This commit is contained in:
Joonas Rikkonen
2019-03-27 20:51:33 +02:00
parent 723df67f6f
commit 5a620ec60d
8 changed files with 280 additions and 26 deletions
@@ -1206,6 +1206,19 @@ namespace Barotrauma
return (int)Math.Ceiling(ConvertUnits.ToDisplayUnits(colliderSize) / Structure.WallSectionSize);
}
#endregion
protected override void OnStateChanged(AIState from, AIState to)
{
latchOntoAI?.DeattachFromBody();
Character.AnimController.ReleaseStuckLimbs();
}
private int GetMinimumPassableHoleCount()
{
return (int)Math.Ceiling(ConvertUnits.ToDisplayUnits(colliderSize) / Structure.WallSectionSize);
}
private bool CanPassThroughHole(Structure wall, int sectionIndex)
{
int requiredHoleCount = GetMinimumPassableHoleCount();