diff --git a/desktop_version/src/Logic.cpp b/desktop_version/src/Logic.cpp index a8021034..91b26542 100644 --- a/desktop_version/src/Logic.cpp +++ b/desktop_version/src/Logic.cpp @@ -129,6 +129,32 @@ void gamelogic(void) obj.entities[i].lerpoldyp = obj.entities[i].yp; }} + if (!game.blackout && !game.completestop) + { + size_t i; + for (i = 0; i < obj.entities.size(); ++i) + { + /* Is this entity on the ground? (needed for jumping) */ + if (obj.entitycollidefloor(i)) + { + obj.entities[i].onground = 2; + } + else + { + --obj.entities[i].onground; + } + + if (obj.entitycollideroof(i)) + { + obj.entities[i].onroof = 2; + } + else + { + --obj.entities[i].onroof; + } + } + } + //Misc if (map.towermode) { diff --git a/desktop_version/src/RenderFixed.cpp b/desktop_version/src/RenderFixed.cpp index 2422624e..e84c79b0 100644 --- a/desktop_version/src/RenderFixed.cpp +++ b/desktop_version/src/RenderFixed.cpp @@ -26,28 +26,24 @@ void gamerenderfixed(void) { for (size_t i = 0; i < obj.entities.size(); i++) { - //Is this entity on the ground? (needed for jumping) if (obj.entitycollidefloor(i)) { - obj.entities[i].onground = 2; + obj.entities[i].visualonground = 2; } else { - obj.entities[i].onground--; + --obj.entities[i].visualonground; } if (obj.entitycollideroof(i)) { - obj.entities[i].onroof = 2; + obj.entities[i].visualonroof = 2; } else { - obj.entities[i].onroof--; + --obj.entities[i].visualonroof; } - obj.entities[i].visualonground = obj.entities[i].onground; - obj.entities[i].visualonroof = obj.entities[i].onroof; - //Animate the entities obj.animateentities(i); }