From 58098dc7483f559786a6b6a890495b4161dec769 Mon Sep 17 00:00:00 2001 From: leo60228 Date: Thu, 2 Sep 2021 14:47:12 -0400 Subject: [PATCH] Only apply flip momentum to player entities on ground/roof --- desktop_version/src/Input.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/desktop_version/src/Input.cpp b/desktop_version/src/Input.cpp index 7277389f..390a142b 100644 --- a/desktop_version/src/Input.cpp +++ b/desktop_version/src/Input.cpp @@ -2258,7 +2258,7 @@ void gameinput(void) game.gravitycontrol = 1; for (size_t ie = 0; ie < obj.entities.size(); ++ie) { - if (obj.entities[ie].rule == 0) + if (obj.entities[ie].rule == 0 && obj.entities[ie].onground) { obj.entities[ie].vy = -4; obj.entities[ie].ay = -3; @@ -2273,7 +2273,7 @@ void gameinput(void) game.gravitycontrol = 0; for (size_t ie = 0; ie < obj.entities.size(); ++ie) { - if (obj.entities[ie].rule == 0) + if (obj.entities[ie].rule == 0 && obj.entities[ie].onroof) { obj.entities[ie].vy = 4; obj.entities[ie].ay = 3;