Bug #1646 » 1646.v3.patch
| common/unit.c | ||
|---|---|---|
|
{
|
||
|
int i;
|
||
|
if (orders == NULL) { // no orders
|
||
|
return TRUE;
|
||
|
}
|
||
|
for (i = 0; i < length; i++) {
|
||
|
struct action *paction;
|
||
|
struct extra_type *pextra;
|
||
| 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;
|
||
|
break;
|
||
|
}
|
||
| ... | ... | |
|
} else {
|
||
|
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;
|
||
|
break;
|
||
|
}
|
||
| ... | ... | |
|
/* Missing required action extra target. */
|
||
|
free(punit->orders.list);
|
||
|
punit->orders.list = NULL;
|
||
|
punit->orders.length = 0;
|
||
|
punit->has_orders = FALSE;
|
||
|
break;
|
||
|
}
|
||
| ... | ... | |
|
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);
|
||
|
}
|
||
|
-
|
||
| common/unit.c | ||
|---|---|---|
|
{
|
||
|
int i;
|
||
|
if (orders == NULL) { // no orders
|
||
|
return TRUE;
|
||
|
}
|
||
|
for (i = 0; i < length; i++) {
|
||
|
struct action *paction;
|
||
|
struct extra_type *pextra;
|
||
| server/savegame/savegame2.c | ||
|---|---|---|
|
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;
|
||
| server/savegame/savegame3.c | ||
|---|---|---|
|
punit->orders.list = NULL;
|
||
|
punit->orders.length = 0;
|
||
|
punit->has_orders = FALSE;
|
||
|
punit->goto_tile = NULL;
|
||
|
break;
|
||
|
}
|
||
| ... | ... | |
|
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;
|
||
- « Previous
- 1
- 2
- 3
- Next »