while (1) {
planets = 0;
- if (!time)
- goto skip;
-
list_for_each_entry(pl1, &planet->list, list) {
pl2 = list_to_planet(pl1->list.next);
list_for_each_entry_from(pl2, &planet->list, list) {
move_camera(&camera, true_time);
-skip:
if (poll_events(&status, true_time))
return;
/* Check if we have crossed any of the parents */
parent = p->tree.parent;
- while(parent) {
+ while (parent) {
pa = tree_to_planet(parent);
if (p->pos.x < pa->pos.x && new_pos.x > pa->pos.x)
modify = 1;
return tree_to_planet(tree_parent);
}
+ /*
+ * Now, search the subtree for any crossed children and move
+ * them into correct place within the tree.
+ */
it.qt_iterator.head = &p->tree;
it.limit[0] = p->pos;
it.limit[1] = new_pos;