fix destroyed walls count too high
This commit is contained in:
parent
3d69f592f6
commit
6045de0c7d
2 changed files with 8 additions and 5 deletions
|
@ -76,11 +76,8 @@ internal sealed class CollideBullets(
|
|||
for (var y = pixel.Y - i; y <= pixel.Y + i; y++)
|
||||
{
|
||||
var offsetPixel = new PixelPosition(x, y);
|
||||
if (options.Value.DestructibleWalls)
|
||||
{
|
||||
map.Current.DestroyWallAt(offsetPixel);
|
||||
if (options.Value.DestructibleWalls && map.Current.TryDestroyWallAt(offsetPixel))
|
||||
owner.Scores.WallsDestroyed++;
|
||||
}
|
||||
|
||||
TryHitTankAt(offsetPixel.ToFloatPosition(), owner);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue