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:
Enno Rehling 2004-12-23 00:07:32 +00:00
parent c8e4e0fcae
commit 353d2775c8
1 changed files with 9 additions and 4 deletions

View File

@ -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);