From c64fdf142d7cf79b0226a0886d18f2afb4cc3ff1 Mon Sep 17 00:00:00 2001 From: Ozzatron Date: Mon, 25 Nov 2019 21:06:50 -0500 Subject: [PATCH] todo: i'll fix global tile kill tile --- Tiles/CalamityGlobalTile.cs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Tiles/CalamityGlobalTile.cs b/Tiles/CalamityGlobalTile.cs index 1129e0cdbd..7ad42caefa 100644 --- a/Tiles/CalamityGlobalTile.cs +++ b/Tiles/CalamityGlobalTile.cs @@ -149,9 +149,13 @@ namespace CalamityMod.Tiles } } - public override void KillTile(int i, int j, int type, ref bool fail, ref bool effectOnly, ref bool noItem) + public override void KillTile(int i, int j, int type, ref bool fail, ref bool effectOnly, ref bool noItem) { - if (Main.tile[i, j].type != ModContent.TileType() && Main.tile[i, j].type != ModContent.TileType() && Main.tileSolid[Main.tile[i, j].type]) + // TODO -- holy shit THAT IS NOT HOW YOU NULL CHECK OH MY GOD THIS EXPLAINS EVERYTHING + if(Main.tile[i,j] is null) + return; + + if (Main.tile[i, j].type != ModContent.TileType() && Main.tile[i, j].type != ModContent.TileType() && Main.tileSolid[Main.tile[i, j].type]) { if (Main.tile[i + 1, j] != null) {