From 519de2a17b172d703fdfb6411ea4d00cf9117467 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miloslav=20=C4=8C=C3=AD=C5=BE?= Date: Sat, 8 Sep 2018 10:53:15 +0200 Subject: [PATCH] Revert corners --- raycastlib.h | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/raycastlib.h b/raycastlib.h index b1f6993..f4c7c3a 100644 --- a/raycastlib.h +++ b/raycastlib.h @@ -1071,11 +1071,8 @@ void moveCameraWithCollision(Camera *camera, Vector2D planeOffset, if (xyCollides) { - if (wrap(cornerNew.x,UNITS_PER_SQUARE) > - wrap(cornerNew.y,UNITS_PER_SQUARE)) - yCollides = true; - else - xCollides = true; + // normally should slide, but let's KISS + cornerNew = corner; } } }