diff --git a/desktop_version/src/Logic.cpp b/desktop_version/src/Logic.cpp index 4e4ec015..c1456d20 100644 --- a/desktop_version/src/Logic.cpp +++ b/desktop_version/src/Logic.cpp @@ -1044,12 +1044,9 @@ void gamelogic() { obj.entities[i].xp += 320; } - else + else if (obj.entities[i].xp > 310) { - if (obj.entities[i].xp > 310) - { - obj.entities[i].xp -= 320; - } + obj.entities[i].xp -= 320; } } } @@ -1064,12 +1061,9 @@ void gamelogic() { obj.entities[i].yp += 232; } - else + else if (obj.entities[i].yp > 226) { - if (obj.entities[i].yp > 226) - { - obj.entities[i].yp -= 232; - } + obj.entities[i].yp -= 232; } } } @@ -1088,12 +1082,9 @@ void gamelogic() { obj.entities[i].xp += 400; } - else + else if (obj.entities[i].xp > 320) { - if (obj.entities[i].xp > 320) - { - obj.entities[i].xp -= 400; - } + obj.entities[i].xp -= 400; } } else @@ -1102,12 +1093,9 @@ void gamelogic() { obj.entities[i].xp += 320; } - else + else if (obj.entities[i].xp > 310) { - if (obj.entities[i].xp > 310) - { - obj.entities[i].xp -= 320; - } + obj.entities[i].xp -= 320; } } } @@ -1134,12 +1122,9 @@ void gamelogic() { obj.entities[i].yp += 232; } - else + else if (obj.entities[i].yp > 226) { - if (obj.entities[i].yp > 226) - { - obj.entities[i].yp -= 232; - } + obj.entities[i].yp -= 232; } } } @@ -1154,12 +1139,9 @@ void gamelogic() { obj.entities[i].xp += 350; } - else + else if (obj.entities[i].xp > 320) { - if (obj.entities[i].xp > 320) - { - obj.entities[i].xp -= 350; - } + obj.entities[i].xp -= 350; } } }