Turret rotation fix, CharacterInventory networking bugfixes, prevent limbs clipping with other colliders when mirroring, fixed mantis animations, better looking explosions, spark effect when overvoltage breaks an item

This commit is contained in:
Regalis
2015-09-04 21:56:39 +03:00
parent 2f08dcf3f9
commit 0cbcdd0b03
35 changed files with 393 additions and 262 deletions
@@ -162,9 +162,11 @@ namespace Subsurface.Items.Components
ignoredBodies.Clear();
f2.Body.ApplyLinearImpulse(item.body.LinearVelocity * item.body.Mass);
if (attackResult.HitArmor)
{
item.body.LinearVelocity *= 0.5f;
item.body.LinearVelocity *= 0.1f;
}
else if (doesStick)
{
@@ -175,7 +177,10 @@ namespace Subsurface.Items.Components
if (Vector2.Dot(f1.Body.LinearVelocity, normal) < 0.0f) return StickToTarget(f2.Body, dir);
}
else
{
item.body.LinearVelocity *= 0.5f;
}
var containedItems = item.ContainedItems;
if (containedItems == null) return true;
@@ -188,7 +193,7 @@ namespace Subsurface.Items.Components
contained.Condition = 0.0f;
}
return true;
return false;
}
private bool StickToTarget(Body targetBody, Vector2 axis)