From 60a106a27c4a260ab6625d8da0dbc6864a616d72 Mon Sep 17 00:00:00 2001 From: Nathan Adams Date: Sat, 2 Jun 2012 17:14:16 -0500 Subject: [PATCH] Removing unneeded comments Adding a check in Body class to make sure fixtures exist before executing code --- axios/Dynamics/Body.cs | 5 +++++ axios/Engine/SimpleDrawableAxiosGameObject.cs | 6 +----- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/axios/Dynamics/Body.cs b/axios/Dynamics/Body.cs index a3f857a..3ff41a4 100644 --- a/axios/Dynamics/Body.cs +++ b/axios/Dynamics/Body.cs @@ -827,6 +827,11 @@ namespace FarseerPhysics.Dynamics /// The angle. public void SetTransformIgnoreContacts(ref Vector2 position, float angle) { + // Sometimes this is called with an empty Fixture list + // -- Nathan Adams [adamsna@datanethost.net] - 6/2/2012 + if (FixtureList == null || FixtureList.Count == 0) + return; + Xf.R.Set(angle); Xf.Position = position; diff --git a/axios/Engine/SimpleDrawableAxiosGameObject.cs b/axios/Engine/SimpleDrawableAxiosGameObject.cs index 887ce7c..eee8aed 100644 --- a/axios/Engine/SimpleDrawableAxiosGameObject.cs +++ b/axios/Engine/SimpleDrawableAxiosGameObject.cs @@ -33,16 +33,12 @@ namespace Axios.Engine public override void LoadContent(AxiosGameScreen gameScreen) { base.LoadContent(gameScreen); - - //this.Texture = new Texture2D(gameScreen.ScreenManager.GraphicsDevice, 1, 1); + } public virtual void Draw(AxiosGameScreen gameScreen, GameTime gameTime) { - /*#if DEBUG - System.Diagnostics.Debugger.Break(); - #endif*/ if (_relativetocamera) gameScreen.ScreenManager.SpriteBatch.Begin(0, null, null, null, null, null, gameScreen.Camera.View); else