diff --git a/Barotrauma/BarotraumaShared/Source/Characters/Animation/HumanoidAnimController.cs b/Barotrauma/BarotraumaShared/Source/Characters/Animation/HumanoidAnimController.cs index aebc19264..ae83fb868 100644 --- a/Barotrauma/BarotraumaShared/Source/Characters/Animation/HumanoidAnimController.cs +++ b/Barotrauma/BarotraumaShared/Source/Characters/Animation/HumanoidAnimController.cs @@ -80,6 +80,14 @@ namespace Barotrauma ColliderIndex = Crouching ? 1 : 0; if (!Crouching && ColliderIndex == 1) Crouching = true; + //stun (= disable the animations) if the ragdoll receives a large enough impact + if (strongestImpact > 0.0f) + { + character.SetStun(MathHelper.Min(strongestImpact * 0.5f, 5.0f)); + strongestImpact = 0.0f; + return; + } + if (!character.AllowInput) { levitatingCollider = false; @@ -95,15 +103,6 @@ namespace Barotrauma return; } - //stun (= disable the animations) if the ragdoll receives a large enough impact - if (strongestImpact > 0.0f) - { - character.SetStun(MathHelper.Min(strongestImpact * 0.5f, 5.0f)); - strongestImpact = 0.0f; - return; - } - - //re-enable collider if (!Collider.Enabled) {