Removing unneeded comments

Adding a check in Body class to make sure fixtures exist before executing code
This commit is contained in:
Nathan Adams 2012-06-02 17:14:16 -05:00
parent 14cbefc6ef
commit 60a106a27c
2 changed files with 6 additions and 5 deletions

View File

@ -827,6 +827,11 @@ namespace FarseerPhysics.Dynamics
/// <param name="angle">The angle.</param> /// <param name="angle">The angle.</param>
public void SetTransformIgnoreContacts(ref Vector2 position, float 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.R.Set(angle);
Xf.Position = position; Xf.Position = position;

View File

@ -33,16 +33,12 @@ namespace Axios.Engine
public override void LoadContent(AxiosGameScreen gameScreen) public override void LoadContent(AxiosGameScreen gameScreen)
{ {
base.LoadContent(gameScreen); base.LoadContent(gameScreen);
//this.Texture = new Texture2D(gameScreen.ScreenManager.GraphicsDevice, 1, 1);
} }
public virtual void Draw(AxiosGameScreen gameScreen, GameTime gameTime) public virtual void Draw(AxiosGameScreen gameScreen, GameTime gameTime)
{ {
/*#if DEBUG
System.Diagnostics.Debugger.Break();
#endif*/
if (_relativetocamera) if (_relativetocamera)
gameScreen.ScreenManager.SpriteBatch.Begin(0, null, null, null, null, null, gameScreen.Camera.View); gameScreen.ScreenManager.SpriteBatch.Begin(0, null, null, null, null, null, gameScreen.Camera.View);
else else