Project

Profile

Help

HostedRedmine.com has moved to the Planio platform. All logins and passwords remained the same. All users will be able to login and use Redmine just as before. *Read more...*

Bug #876807 ยป 0002-sg.patch

Sveinung Kvilhaugsvik, 2020-06-07 11:02 AM

View differences:

server/savegame/savecompat.c
/* Rewind to the beginning of the orders */
for (i = act_unit->orders.index; i > 0; i--) {
struct unit_order *prev_order = &act_unit->orders.list[i - 1];
if (direction8_is_valid(prev_order->dir)) {
if (!(prev_order->order == ORDER_PERFORM_ACTION
&& utype_is_unmoved_by_action(action_by_number(prev_order->action),
unit_type_get(act_unit)))
&& direction8_is_valid(prev_order->dir)) {
current_tile = mapstep(&(wld.map), current_tile,
dir_opposite(prev_order->dir));
}
......
}
if (order->order == ORDER_PERFORM_ACTION) {
struct action *paction = action_by_number(order->action);
order->target = tgt_tile->index;
/* Leave no traces. */
order->dir = DIR8_ORIGIN;
}
current_tile = tgt_tile;
if (!utype_is_unmoved_by_action(paction, unit_type_get(act_unit))) {
/* The action moves the unit to the target tile (unless this is the
* final order) */
fc_assert(utype_is_moved_to_tgt_by_action(paction,
unit_type_get(act_unit))
|| i == act_unit->orders.length - 1);
current_tile = tgt_tile;
}
} else {
current_tile = tgt_tile;
}
}
}
    (1-1/1)