forked from github/server
remove bad assumption
units on ships are not all at the end of the list, or ordered.
This commit is contained in:
parent
e4e06dfcbe
commit
e23d5e6949
1 changed files with 1 additions and 4 deletions
|
@ -633,7 +633,7 @@ void move_ship(ship * sh, region * from, region * to, region_list * route)
|
|||
leave_trail(sh, from, route);
|
||||
}
|
||||
|
||||
if (route != NULL) {
|
||||
if (route != NULL && from->units) {
|
||||
unit** iunit = &from->units;
|
||||
unit** ulist = &to->units;
|
||||
unit* ufirst = NULL;
|
||||
|
@ -658,9 +658,6 @@ void move_ship(ship * sh, region * from, region * to, region_list * route)
|
|||
produceexp(u, SK_SAILING, u->number);
|
||||
}
|
||||
}
|
||||
else if (ufirst) {
|
||||
break;
|
||||
}
|
||||
else {
|
||||
iunit = &u->next;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue