From 560093123743b4c188ce6cd63370829d146ec5b5 Mon Sep 17 00:00:00 2001 From: Zidonuke Date: Wed, 28 Dec 2011 23:33:57 -0500 Subject: [PATCH] Fix collision check to use same code as Spawn() --- TShockAPI/TShock.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/TShockAPI/TShock.cs b/TShockAPI/TShock.cs index d1c21d43..52402204 100644 --- a/TShockAPI/TShock.cs +++ b/TShockAPI/TShock.cs @@ -1253,12 +1253,12 @@ namespace TShockAPI public static bool CheckPlayerCollision(int x, int y) { - if (x + 1 <= Main.maxTilesX && y + 3 <= Main.maxTilesY - && x >= 0 && y >= 0) + if (x + 2 <= Main.maxTilesX && y <= Main.maxTilesY + && x >= 1 && y >= 3) { - for (int i = x; i < x + 2; i++) + for (int i = x - 1; i < x + 2; i++) { - for (int h = y; h < y + 4; h++) + for (int h = y - 3; h < y; h++) { if (!Main.tile[i, h].active || !Main.tileSolid[Main.tile[i, h].type] || Main.tileSolidTop[Main.tile[i, h].type]) return false;