From b3b1a0696b0bdcd99e4e7a9158caca29f16d0c45 Mon Sep 17 00:00:00 2001 From: Misa Date: Tue, 6 Oct 2020 16:16:48 -0700 Subject: [PATCH] Unindent entity update loops from previous commit This unindent is done in a separate commit to minimize diff noise. --- desktop_version/src/Logic.cpp | 42 +++++++++++++++++------------------ 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/desktop_version/src/Logic.cpp b/desktop_version/src/Logic.cpp index 79055fec..3c409f12 100644 --- a/desktop_version/src/Logic.cpp +++ b/desktop_version/src/Logic.cpp @@ -894,19 +894,19 @@ void gamelogic() continue; } - obj.removeblockat(obj.entities[i].xp, obj.entities[i].yp); + obj.removeblockat(obj.entities[i].xp, obj.entities[i].yp); - bool entitygone = obj.updateentities(i); // Behavioral logic - if (entitygone) continue; - obj.updateentitylogic(i); // Basic Physics - obj.entitymapcollision(i); // Collisions with walls + bool entitygone = obj.updateentities(i); // Behavioral logic + if (entitygone) continue; + obj.updateentitylogic(i); // Basic Physics + obj.entitymapcollision(i); // Collisions with walls - obj.createblock(0, obj.entities[i].xp, obj.entities[i].yp, obj.entities[i].w, obj.entities[i].h); - obj.movingplatformfix(i, obj.getplayer()); - if (game.supercrewmate) - { - obj.movingplatformfix(i, obj.getscm()); - } + obj.createblock(0, obj.entities[i].xp, obj.entities[i].yp, obj.entities[i].w, obj.entities[i].h); + obj.movingplatformfix(i, obj.getplayer()); + if (game.supercrewmate) + { + obj.movingplatformfix(i, obj.getscm()); + } } } @@ -920,14 +920,14 @@ void gamelogic() continue; } - obj.removeblockat(obj.entities[ie].xp, obj.entities[ie].yp); + obj.removeblockat(obj.entities[ie].xp, obj.entities[ie].yp); - bool entitygone = obj.updateentities(ie); // Behavioral logic - if (entitygone) continue; - obj.updateentitylogic(ie); // Basic Physics - obj.entitymapcollision(ie); // Collisions with walls + bool entitygone = obj.updateentities(ie); // Behavioral logic + if (entitygone) continue; + obj.updateentitylogic(ie); // Basic Physics + obj.entitymapcollision(ie); // Collisions with walls - obj.hormovingplatformfix(ie); + obj.hormovingplatformfix(ie); } //is the player standing on a moving platform? int i = obj.getplayer(); @@ -955,10 +955,10 @@ void gamelogic() continue; } - bool entitygone = obj.updateentities(ie); // Behavioral logic - if (entitygone) continue; - obj.updateentitylogic(ie); // Basic Physics - obj.entitymapcollision(ie); // Collisions with walls + bool entitygone = obj.updateentities(ie); // Behavioral logic + if (entitygone) continue; + obj.updateentitylogic(ie); // Basic Physics + obj.entitymapcollision(ie); // Collisions with walls } obj.entitycollisioncheck(); // Check ent v ent collisions, update states