From 9de3aba94b60db66079563d658f57937f38df21d Mon Sep 17 00:00:00 2001 From: Misa Date: Sat, 5 Sep 2020 16:55:34 -0700 Subject: [PATCH] Fix sprite of player if they are stuck in a wall If the player is stuck in a wall (which shouldn't happen in the first place), their sprite would always default to being flipped, even if they were unflipped. Being stuck in a wall is characterized by having both positive onfloor and onground. --- desktop_version/src/Entity.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/desktop_version/src/Entity.cpp b/desktop_version/src/Entity.cpp index b74bbaa8..432f53af 100644 --- a/desktop_version/src/Entity.cpp +++ b/desktop_version/src/Entity.cpp @@ -3326,6 +3326,12 @@ void entityclass::animateentities( int _i ) } if (entities[_i].onroof > 0) entities[_i].drawframe += 6; + // Stuck in a wall? Then default to gravitycontrol + if (entities[_i].onground > 0 && entities[_i].onroof > 0 + && game.gravitycontrol == 0) + { + entities[_i].drawframe -= 6; + } } else {