public override void Kill(int timeLeft) { Vector2 position = Projectile.Center; SoundEngine.PlaySound(SoundID.Item14, (int)position.X, (int)position.Y); if (Main.netMode == NetmodeID.MultiplayerClient) { return; } // All the way across for (int x = 1; x <= Main.maxTilesX; x++) { // Six down, last is platforms for (int y = -5; y <= 0; y++) { int xPosition = x; int yPosition = (int)(y + position.Y / 16.0f); if (xPosition < 0 || xPosition >= Main.maxTilesX || yPosition < 0 || yPosition >= Main.maxTilesY) { continue; } Tile tile = Main.tile[xPosition, yPosition]; if (tile == null) { continue; } if (!FargoGlobalProjectile.OkayToDestroyTile(tile)) { continue; } FargoGlobalTile.ClearEverything(xPosition, yPosition); if (y == 0) { FargoGlobalTile.ClearEverything(xPosition, yPosition, false); // Spawn platforms WorldGen.PlaceTile(xPosition, yPosition, TileID.Platforms, false, false, -1, 13); if (Main.netMode == NetmodeID.Server) { NetMessage.SendTileSquare(-1, xPosition, yPosition, 1); } } else { if (!FargoGlobalProjectile.TileIsLiterallyAir(tile)) { FargoGlobalTile.ClearEverything(xPosition, yPosition); } } } } }
public override void Kill(int timeLeft) { SoundEngine.PlaySound(SoundID.Item15, Projectile.Center); SoundEngine.PlaySound(SoundID.Item14, Projectile.Center); if (Main.netMode == NetmodeID.MultiplayerClient) { return; } Vector2 position = Projectile.Center; int radius = 60; //bigger = boomer for (int x = -radius; x <= radius; x++) { for (int y = -radius * 2; y <= 0; y++) { int xPosition = (int)(x + position.X / 16.0f); int yPosition = (int)(y + position.Y / 16.0f); if (xPosition < 0 || xPosition >= Main.maxTilesX || yPosition < 0 || yPosition >= Main.maxTilesY) { continue; } Tile tile = Main.tile[xPosition, yPosition]; if (tile == null) { continue; } if (!FargoGlobalProjectile.OkayToDestroyTile(tile) || FargoGlobalProjectile.TileIsLiterallyAir(tile)) { continue; } FargoGlobalTile.ClearEverything(xPosition, yPosition); } } Main.refreshMap = true; }