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
@@ -434,16 +434,13 @@ namespace FarseerPhysics.Collision
/// <param name="a">The first AABB.</param>
/// <param name="b">The second AABB.</param>
/// <returns>True if they are overlapping.</returns>
public static bool TestOverlap(ref AABB a, ref AABB b)
{
Vector2 d1 = b.LowerBound - a.UpperBound;
Vector2 d2 = a.LowerBound - b.UpperBound;
if (d1.X > 0.0f || d1.Y > 0.0f)
return false;
if (d2.X > 0.0f || d2.Y > 0.0f)
return false;
if (b.LowerBound.X - a.UpperBound.X > 0.0f ||
b.LowerBound.Y - a.UpperBound.Y > 0.0f ||
a.LowerBound.X - b.UpperBound.X > 0.0f ||
a.LowerBound.Y - b.UpperBound.Y > 0.0f) return false;
return true;
}
+4 -7
View File
@@ -77,10 +77,9 @@ namespace FarseerPhysics.Common
public static Vector2 Mul(ref Transform T, ref Vector2 v)
{
float x = (T.q.c * v.X - T.q.s * v.Y) + T.p.X;
float y = (T.q.s * v.X + T.q.c * v.Y) + T.p.Y;
return new Vector2(x, y);
return new Vector2(
(T.q.c * v.X - T.q.s * v.Y) + T.p.X,
(T.q.s * v.X + T.q.c * v.Y) + T.p.Y);
}
public static Vector2 MulT(ref Mat22 A, Vector2 v)
@@ -102,10 +101,8 @@ namespace FarseerPhysics.Common
{
float px = v.X - T.p.X;
float py = v.Y - T.p.Y;
float x = (T.q.c * px + T.q.s * py);
float y = (-T.q.s * px + T.q.c * py);
return new Vector2(x, y);
return new Vector2(T.q.c * px + T.q.s * py, -T.q.s * px + T.q.c * py);
}
// A^T * B
+1 -1
View File
@@ -47,7 +47,7 @@ namespace FarseerPhysics
/// NOTE: If you are using a debug view that shows performance counters,
/// you might want to enable this.
/// </summary>
public const bool EnableDiagnostics = true;
public const bool EnableDiagnostics = false;
/// <summary>
/// Set this to true to skip sanity checks in the engine. This will speed up the