]> Dogcows Code - chaz/carfire/commitdiff
Projectiles disappear when they hit a wall(or occupied square)
authorKyle <Kyle@92bb83a3-7c8f-8a45-bc97-515c4e399668>
Thu, 15 Apr 2010 05:13:47 +0000 (05:13 +0000)
committerKyle <Kyle@92bb83a3-7c8f-8a45-bc97-515c4e399668>
Thu, 15 Apr 2010 05:13:47 +0000 (05:13 +0000)
git-svn-id: https://bd85.net/svn/cs3505_group@89 92bb83a3-7c8f-8a45-bc97-515c4e399668

CarFire/CarFire/CarFire/Projectile.cs

index 1dd5e08eaf1e1ac40a9f5e73e056fe81960eada6..a294a7851bbbb15a9d8f5ba15e0da84446da383c 100644 (file)
@@ -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.\r
             if ((int)((pixelX + velocity.X) / Map.PixelsToUnitSquares) != gridX || (int)((pixelY + velocity.Y) / Map.PixelsToUnitSquares) != gridY)\r
             {\r
-                bool open = theMap.IsCellOpen((int)((pixelX + velocity.X) /Map.PixelsToUnitSquares), (int)((pixelY + velocity.Y) / Map.PixelsToUnitSquares));\r
+                //bool open = theMap.IsCellOpen((int)((pixelX + velocity.X) /Map.PixelsToUnitSquares), (int)((pixelY + velocity.Y) / Map.PixelsToUnitSquares));\r
                 //If open just move this projectile there\r
                 //***Map doesn't need to know that this projectile is there because players/monsters are allowed\r
                 // to move into the path of projectiles.\r
-                if (open)\r
+                //if (open)\r
                 {\r
                 Console.WriteLine("pixelX:" + pixelX + " " + " pixelY: "+ pixelY);\r
                     pixelX += (int)velocity.X;\r
This page took 0.024007 seconds and 4 git commands to generate.