From 78b9f7bc72809b88446ef37f5dbf98cca82dd77e Mon Sep 17 00:00:00 2001 From: Anders Jenbo Date: Thu, 5 Dec 2019 01:23:19 +0100 Subject: [PATCH] [controller] Only ignore doors when at same coordinates This made it harder to use schrines and book shelfs --- SourceX/controls/plrctrls.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/SourceX/controls/plrctrls.cpp b/SourceX/controls/plrctrls.cpp index 53251492c..fbcd8ead4 100644 --- a/SourceX/controls/plrctrls.cpp +++ b/SourceX/controls/plrctrls.cpp @@ -127,13 +127,13 @@ void FindItemOrObject() for (int xx = -1; xx < 2; xx++) { for (int yy = -1; yy < 2; yy++) { - if (xx == 0 && yy == 0) - continue; // Ignore doorway so we don't get stuck behind barrels if (dObject[mx + xx][my + yy] == 0) continue; int o = dObject[mx + xx][my + yy] > 0 ? dObject[mx + xx][my + yy] - 1 : -(dObject[mx + xx][my + yy] + 1); if (object[o]._oSelFlag == 0) continue; + if (xx == 0 && yy == 0 && object[o]._oDoorFlag) + continue; // Ignore doorway so we don't get stuck behind barrels int newRotations = GetRotaryDistance(mx + xx, my + yy); if (rotations < newRotations) continue;