Skip to content

Commit 5dab0e3

Browse files
perf: misc
1 parent 7522b52 commit 5dab0e3

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

objects/obj_star_select/Draw_64.gml

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -128,15 +128,14 @@ if (global.cheat_debug && obj_controller.selecting_planet && !loading)
128128

129129
if (obj_controller.managing == 0) {
130130
var unitsgo = false;
131-
for (var i = 1; i <= target.planets; i++) {
132-
if (target.p_player[i] > 0) {
133-
unitsgo = true;
134-
break;
135-
}
131+
var i = 1;
132+
while (i <= target.planets && !unitsgo) {
133+
unitsgo = target.p_player[i] > 0;
134+
i++;
136135
}
137136

138137
if (unitsgo && point_and_click(draw_unit_buttons([125, 200], "Manage Units",[1,1],c_blue))) {
139-
location_viewer = new UnitQuickFindPanel();
138+
var location_viewer = new UnitQuickFindPanel();
140139
location_viewer.update_garrison_log();
141140
var system_names = struct_get_names(location_viewer.garrison_log);
142141
var sysnum = -1;

0 commit comments

Comments
 (0)