예제 #1
0
 private bool CanKillTile(Hook.WorldGen.orig_CanKillTile_int_int_refBoolean orig, int i, int j, out bool blockDamaged)
 {
     if (clientSwapping && Main.netMode == NetmodeID.SinglePlayer)
     {
         blockDamaged = false;
         if (i < 0 || j < 0 || i >= Main.maxTilesX || j >= Main.maxTilesY)
         {
             return(false);
         }
         Tile tile = Main.tile[i, j];
         if (tile == null)
         {
             return(false);
         }
         if (!tile.active())
         {
             return(false);
         }
         if (!TileLoader.CanKillTile(i, j, tile.type, ref blockDamaged))
         {
             return(false);
         }
         blockDamaged = true;
         return(true);
     }
     return(orig(i, j, out blockDamaged));
 }