Bug #1646 » 1646.v2.patch
| server/savegame/savegame2.c | ||
|---|---|---|
|
/* An invalid order. Just drop the orders for this unit. */
|
||
|
free(punit->orders.list);
|
||
|
punit->orders.list = NULL;
|
||
|
punit->orders.length = 0;
|
||
|
punit->has_orders = FALSE;
|
||
|
punit->goto_tile = NULL;
|
||
|
break;
|
||
|
}
|
||
| ... | ... | |
|
}
|
||
|
}
|
||
|
} else {
|
||
|
punit->goto_tile = NULL;
|
||
|
punit->has_orders = FALSE;
|
||
|
punit->orders.list = NULL;
|
||
|
punit->orders.length = 0;
|
||
|
(void) secfile_entry_lookup(loading->file, "%s.orders_index", unitstr);
|
||
|
(void) secfile_entry_lookup(loading->file, "%s.orders_repeat", unitstr);
|
||
| ... | ... | |
|
players_iterate(pplayer) {
|
||
|
unit_list_iterate_safe(pplayer->units, punit) {
|
||
|
if (!unit_order_list_is_sane(&(wld.map), punit->orders.length,
|
||
|
punit->orders.list)) {
|
||
|
if (punit->has_orders
|
||
|
&& !unit_order_list_is_sane(&(wld.map), punit->orders.length,
|
||
|
punit->orders.list)) {
|
||
|
log_sg("Invalid unit orders for unit %d.", punit->id);
|
||
|
free_unit_orders(punit);
|
||
|
}
|
||
| server/savegame/savegame3.c | ||
|---|---|---|
|
/* An invalid order. Just drop the orders for this unit. */
|
||
|
free(punit->orders.list);
|
||
|
punit->orders.list = NULL;
|
||
|
punit->orders.length = 0;
|
||
|
punit->has_orders = FALSE;
|
||
|
punit->goto_tile = NULL;
|
||
|
break;
|
||
|
}
|
||
| ... | ... | |
|
/* Missing required action extra target. */
|
||
|
free(punit->orders.list);
|
||
|
punit->orders.list = NULL;
|
||
|
punit->orders.length = 0;
|
||
|
punit->has_orders = FALSE;
|
||
|
punit->goto_tile = NULL;
|
||
|
break;
|
||
|
}
|
||
|
} else if (order->order != ORDER_PERFORM_ACTION) {
|
||
| ... | ... | |
|
int j;
|
||
|
punit->has_orders = FALSE;
|
||
|
punit->goto_tile = NULL;
|
||
|
punit->orders.list = NULL;
|
||
|
punit->orders.length = 0;
|
||
|
(void) secfile_entry_lookup(loading->file, "%s.orders_index", unitstr);
|
||
|
(void) secfile_entry_lookup(loading->file, "%s.orders_repeat", unitstr);
|
||
| ... | ... | |
|
players_iterate(pplayer) {
|
||
|
unit_list_iterate_safe(pplayer->units, punit) {
|
||
|
if (!unit_order_list_is_sane(&(wld.map), punit->orders.length,
|
||
|
punit->orders.list)) {
|
||
|
if (punit->has_orders
|
||
|
&& !unit_order_list_is_sane(&(wld.map), punit->orders.length,
|
||
|
punit->orders.list)) {
|
||
|
log_sg("Invalid unit orders for unit %d.", punit->id);
|
||
|
free_unit_orders(punit);
|
||
|
}
|
||