From: Kyle Date: Thu, 15 Apr 2010 05:13:47 +0000 (+0000) Subject: Projectiles disappear when they hit a wall(or occupied square) X-Git-Url: https://git.dogcows.com/gitweb?a=commitdiff_plain;h=b4115cbc63a031622aefd3ebc078b57334270bc9;p=chaz%2Fcarfire Projectiles disappear when they hit a wall(or occupied square) git-svn-id: https://bd85.net/svn/cs3505_group@89 92bb83a3-7c8f-8a45-bc97-515c4e399668 --- diff --git a/CarFire/CarFire/CarFire/Projectile.cs b/CarFire/CarFire/CarFire/Projectile.cs index 1dd5e08..a294a78 100644 --- a/CarFire/CarFire/CarFire/Projectile.cs +++ b/CarFire/CarFire/CarFire/Projectile.cs @@ -64,11 +64,11 @@ namespace CarFire //If the projectile will be moving to a new grid position we need to check to see if it is occupied. if ((int)((pixelX + velocity.X) / Map.PixelsToUnitSquares) != gridX || (int)((pixelY + velocity.Y) / Map.PixelsToUnitSquares) != gridY) { - bool open = theMap.IsCellOpen((int)((pixelX + velocity.X) /Map.PixelsToUnitSquares), (int)((pixelY + velocity.Y) / Map.PixelsToUnitSquares)); + //bool open = theMap.IsCellOpen((int)((pixelX + velocity.X) /Map.PixelsToUnitSquares), (int)((pixelY + velocity.Y) / Map.PixelsToUnitSquares)); //If open just move this projectile there //***Map doesn't need to know that this projectile is there because players/monsters are allowed // to move into the path of projectiles. - if (open) + //if (open) { Console.WriteLine("pixelX:" + pixelX + " " + " pixelY: "+ pixelY); pixelX += (int)velocity.X;