forked from github/server
http://eressea.upb.de/mantis/view.php?id=341 Einheiten in Regionen mit FAHRENden Einheiten bewegen sich u.U. nicht.
This commit is contained in:
parent
c8e4e0fcae
commit
353d2775c8
|
@ -2347,6 +2347,7 @@ movement(void)
|
||||||
region * r = regions;
|
region * r = regions;
|
||||||
while (r!=NULL) {
|
while (r!=NULL) {
|
||||||
unit ** up = &r->units;
|
unit ** up = &r->units;
|
||||||
|
boolean repeat = false;
|
||||||
|
|
||||||
while (*up) {
|
while (*up) {
|
||||||
unit *u = *up;
|
unit *u = *up;
|
||||||
|
@ -2381,13 +2382,17 @@ movement(void)
|
||||||
if (u->region==r) {
|
if (u->region==r) {
|
||||||
/* not moved, use next unit */
|
/* not moved, use next unit */
|
||||||
up = &u->next;
|
up = &u->next;
|
||||||
} else if (*up && (*up)->region!=r) {
|
} else {
|
||||||
|
if (*up && (*up)->region!=r) {
|
||||||
/* moved the upcoming unit along with u (units on ships or followers,
|
/* moved the upcoming unit along with u (units on ships or followers,
|
||||||
* for example). must start from the beginning again */
|
* for example). must start from the beginning again immediately */
|
||||||
up = &r->units;
|
up = NULL;
|
||||||
|
}
|
||||||
|
repeat = true;
|
||||||
}
|
}
|
||||||
/* else *up is already the next unit */
|
/* else *up is already the next unit */
|
||||||
}
|
}
|
||||||
|
if (repeat) continue;
|
||||||
if (ships==0) {
|
if (ships==0) {
|
||||||
/* Abtreiben von beschädigten, unterbemannten, überladenen Schiffen */
|
/* Abtreiben von beschädigten, unterbemannten, überladenen Schiffen */
|
||||||
drifting_ships(r);
|
drifting_ships(r);
|
||||||
|
|
Loading…
Reference in New Issue