Medical items, improved falldamage, "power on" sounds

This commit is contained in:
Regalis
2015-07-24 13:46:22 +03:00
parent c2be74324d
commit 461547d949
12 changed files with 105 additions and 12 deletions
+11 -1
View File
@@ -312,7 +312,17 @@ namespace Subsurface
private void CalculateImpact(Fixture f1, Fixture f2, Contact contact)
{
Vector2 normal = contact.Manifold.LocalNormal;
float impact = Vector2.Dot(f1.Body.LinearVelocity, -normal);
Vector2 avgVelocity = Vector2.Zero;
foreach (Limb limb in limbs)
{
avgVelocity += limb.LinearVelocity;
}
avgVelocity = avgVelocity / limbs.Count();
float impact = Vector2.Dot((f1.Body.LinearVelocity + avgVelocity)/2.0f, -normal);
Limb l = (Limb)f1.Body.UserData;