From 21af333d9019f7dd9e2a5ccf19a00192c73f834f Mon Sep 17 00:00:00 2001 From: staphen Date: Fri, 4 Aug 2023 09:50:21 -0400 Subject: [PATCH] Fix missiles passing through enemies on SW/NE diagonal --- Source/missiles.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/missiles.cpp b/Source/missiles.cpp index eb8e49fe6..837344c31 100644 --- a/Source/missiles.cpp +++ b/Source/missiles.cpp @@ -526,7 +526,7 @@ bool MoveMissile(Missile &missile, tl::function_ref checkTile, bool // skip collision logic if the missile is on a corner between tiles if (pixelsTraveled.deltaY % 16 == 0 && pixelsTraveled.deltaX % 32 == 0 - && (pixelsTraveled.deltaY / 16) % 2 != (pixelsTraveled.deltaX / 32) % 2) { + && abs(pixelsTraveled.deltaY / 16) % 2 != abs(pixelsTraveled.deltaX / 32) % 2) { continue; }