(9b19bda7d) Workaround to characters' arms occasionally spinning when standing in place, don't offset limping characters' feet when not moving (the heavy leaning forwards looks unnatural), added a comment

This commit is contained in:
Joonas Rikkonen
2019-05-03 13:57:42 +03:00
parent 9121c878f5
commit 872eeb70ce
5 changed files with 73 additions and 220 deletions
@@ -692,6 +692,10 @@ namespace Barotrauma
character.AddDamage(impactPos, new List<Affliction>() { AfflictionPrefab.InternalDamage.Instantiate((impact - ImpactTolerance) * 10.0f) }, 0.0f, true);
strongestImpact = Math.Max(strongestImpact, impact - ImpactTolerance);
character.ApplyStatusEffects(ActionType.OnImpact, 1.0f);
//briefly disable impact damage
//otherwise the character will take damage multiple times when for example falling,
//because we use the velocity of the collider to determine the impact
//(i.e. the character would take damage until the collider hits the floor and stops)
character.DisableImpactDamageTimer = 0.25f;
}
}