while (1) {
planets = 0;
- list_for_each_entry(pl1, &planet->list, list) {
- pl2 = list_to_planet(pl1->list.next);
- list_for_each_entry_from(pl2, &planet->list, list) {
- struct planet *ptmp;
- if (!gravitize_planets(pl1, pl2,
- step_time))
- continue;
-
- ptmp = list_to_planet(pl2->list.prev);
- merge_planets(pl1, pl2);
- pl2 = ptmp;
+ if (status.time_scale > 0) {
+ list_for_each_entry(pl1, &planet->list, list) {
+ pl2 = list_to_planet(pl1->list.next);
+ list_for_each_entry_from(pl2, &planet->list,
+ list) {
+ struct planet *ptmp;
+ if (!gravitize_planets(pl1, pl2,
+ step_time))
+ continue;
+
+ ptmp = list_to_planet(pl2->list.prev);
+ merge_planets(pl1, pl2);
+ pl2 = ptmp;
+ }
+
+ planet_root = move_planet(pl1, step_time);
+ planets++;
}
-
- planet_root = move_planet(pl1, step_time);
- planets++;
}
-
move_camera(&camera, true_time);
if (poll_events(&status, true_time))