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;
|
||||
while (r!=NULL) {
|
||||
unit ** up = &r->units;
|
||||
boolean repeat = false;
|
||||
|
||||
while (*up) {
|
||||
unit *u = *up;
|
||||
|
@ -2381,13 +2382,17 @@ movement(void)
|
|||
if (u->region==r) {
|
||||
/* not moved, use next unit */
|
||||
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,
|
||||
* for example). must start from the beginning again */
|
||||
up = &r->units;
|
||||
* for example). must start from the beginning again immediately */
|
||||
up = NULL;
|
||||
}
|
||||
repeat = true;
|
||||
}
|
||||
/* else *up is already the next unit */
|
||||
}
|
||||
if (repeat) continue;
|
||||
if (ships==0) {
|
||||
/* Abtreiben von beschädigten, unterbemannten, überladenen Schiffen */
|
||||
drifting_ships(r);
|
||||
|
|
Loading…
Reference in New Issue