diff --git a/Farseer Physics Engine 3.5/Dynamics/Body.cs b/Farseer Physics Engine 3.5/Dynamics/Body.cs
index febc7d8f8..1d48115c3 100644
--- a/Farseer Physics Engine 3.5/Dynamics/Body.cs
+++ b/Farseer Physics Engine 3.5/Dynamics/Body.cs
@@ -779,6 +779,8 @@ namespace FarseerPhysics.Dynamics
/// The world rotation in radians.
public void SetTransform(Vector2 position, float rotation)
{
+ Debug.Assert(position.IsValid());
+
SetTransform(ref position, rotation);
}
@@ -823,6 +825,8 @@ namespace FarseerPhysics.Dynamics
/// The world position of the point of application.
public void ApplyForce(Vector2 force, Vector2 point)
{
+ Debug.Assert(force.IsValid());
+
ApplyForce(ref force, ref point);
}
@@ -841,6 +845,8 @@ namespace FarseerPhysics.Dynamics
/// The force.
public void ApplyForce(Vector2 force)
{
+ Debug.Assert(force.IsValid());
+
ApplyForce(ref force, ref _xf.p);
}
@@ -898,6 +904,8 @@ namespace FarseerPhysics.Dynamics
/// The world impulse vector, usually in N-seconds or kg-m/s.
public void ApplyLinearImpulse(Vector2 impulse)
{
+ Debug.Assert(impulse.IsValid());
+
ApplyLinearImpulse(ref impulse);
}
@@ -911,6 +919,8 @@ namespace FarseerPhysics.Dynamics
/// The world position of the point of application.
public void ApplyLinearImpulse(Vector2 impulse, Vector2 point)
{
+ Debug.Assert(impulse.IsValid());
+
ApplyLinearImpulse(ref impulse, ref point);
}
diff --git a/Subsurface/Content/Items/Tools/plasmaCutter.ogg b/Subsurface/Content/Items/Tools/plasmaCutter.ogg
index c7d38dc98..a23c35600 100644
Binary files a/Subsurface/Content/Items/Tools/plasmaCutter.ogg and b/Subsurface/Content/Items/Tools/plasmaCutter.ogg differ
diff --git a/Subsurface/Content/Items/Tools/weldingTool.ogg b/Subsurface/Content/Items/Tools/weldingTool.ogg
index 4e8d70ba1..e6f4b7172 100644
Binary files a/Subsurface/Content/Items/Tools/weldingTool.ogg and b/Subsurface/Content/Items/Tools/weldingTool.ogg differ
diff --git a/Subsurface/Content/Items/Weapons/railgunbarrel.png b/Subsurface/Content/Items/Weapons/railgunbarrel.png
index 4ab7ed948..85f795ef8 100644
Binary files a/Subsurface/Content/Items/Weapons/railgunbarrel.png and b/Subsurface/Content/Items/Weapons/railgunbarrel.png differ
diff --git a/Subsurface/Content/Sounds/Music/Static Motion.ogg b/Subsurface/Content/Sounds/Music/Static Motion.ogg
new file mode 100644
index 000000000..58e875f87
Binary files /dev/null and b/Subsurface/Content/Sounds/Music/Static Motion.ogg differ
diff --git a/Subsurface/Content/Sounds/Music/Tenebrous Brothers Carnival - Prelude.ogg b/Subsurface/Content/Sounds/Music/Tenebrous Brothers Carnival - Prelude.ogg
new file mode 100644
index 000000000..279894262
Binary files /dev/null and b/Subsurface/Content/Sounds/Music/Tenebrous Brothers Carnival - Prelude.ogg differ
diff --git a/Subsurface/Content/Sounds/sounds.xml b/Subsurface/Content/Sounds/sounds.xml
index 11b40db4f..95075bb76 100644
--- a/Subsurface/Content/Sounds/sounds.xml
+++ b/Subsurface/Content/Sounds/sounds.xml
@@ -32,6 +32,8 @@
-
+
+
+
\ No newline at end of file
diff --git a/Subsurface/Source/Camera.cs b/Subsurface/Source/Camera.cs
index 0a814d173..71c5a45a4 100644
--- a/Subsurface/Source/Camera.cs
+++ b/Subsurface/Source/Camera.cs
@@ -48,7 +48,7 @@ namespace Subsurface
worldView = new Rectangle(
(int)(center.X - newWidth / 2.0f),
- (int)(center.Y - newHeight / 2.0f),
+ (int)(center.Y + newHeight / 2.0f),
(int)newWidth,
(int)newHeight);
diff --git a/Subsurface/Source/Characters/AI/EnemyAIController.cs b/Subsurface/Source/Characters/AI/EnemyAIController.cs
index fc5d47fca..6c1547203 100644
--- a/Subsurface/Source/Characters/AI/EnemyAIController.cs
+++ b/Subsurface/Source/Characters/AI/EnemyAIController.cs
@@ -312,8 +312,12 @@ namespace Subsurface
//limb.body.ApplyTorque(limb.Mass * -20.0f * character.animController.Dir * dir);
}
- limb.body.ApplyLinearImpulse(limb.Mass * 10.0f *
- Vector2.Normalize(attackPosition - limb.SimPosition));
+ Vector2 diff = attackPosition - limb.SimPosition;
+ if (diff.LengthSquared() > 0.00001f)
+ {
+ limb.body.ApplyLinearImpulse(limb.Mass * 10.0f *
+ Vector2.Normalize(attackPosition - limb.SimPosition));
+ }
steeringManager.SteeringSeek(attackPosition + (limb.SimPosition-Position), 5.0f);
diff --git a/Subsurface/Source/Characters/AI/SteeringManager.cs b/Subsurface/Source/Characters/AI/SteeringManager.cs
index 23e96941d..f63e29f44 100644
--- a/Subsurface/Source/Characters/AI/SteeringManager.cs
+++ b/Subsurface/Source/Characters/AI/SteeringManager.cs
@@ -64,6 +64,9 @@ namespace Subsurface
private Vector2 DoSteeringSeek(Vector2 target, float speed = 1.0f)
{
Vector2 targetVel = target - host.Position;
+
+ if (targetVel.LengthSquared() < 0.00001f) return Vector2.Zero;
+
targetVel = Vector2.Normalize(targetVel) * speed;
Vector2 newSteering = targetVel - host.Steering;
diff --git a/Subsurface/Source/Characters/Character.cs b/Subsurface/Source/Characters/Character.cs
index 715a95443..4fd273ae8 100644
--- a/Subsurface/Source/Characters/Character.cs
+++ b/Subsurface/Source/Characters/Character.cs
@@ -862,7 +862,6 @@ namespace Subsurface
{
sounds[i].Play(1.0f, 2000.0f,
AnimController.Limbs[0].body.FarseerBody);
- Debug.WriteLine("playing: " + sounds[i]);
return;
}
n++;
@@ -944,7 +943,7 @@ namespace Subsurface
{
joint.LimitEnabled = false;
}
- Kill(true);
+ Kill();
}
private IEnumerable