Project

General

Profile

Feature #598 » 0070-savegame-Save-ACTION_NONE-as-1.patch

S3_2 - Marko Lindqvist, 05/13/2024 02:44 AM

View differences:

server/savegame/savegame3.c
order->dir = char2dir(rally_dirs[i]);
order->activity = char2activity(rally_activities[i]);
unconverted = secfile_lookup_int_default(loading->file, ACTION_NONE,
unconverted = secfile_lookup_int_default(loading->file, -1,
"%s.rally_point_action_vec,%d",
citystr, i);
if (unconverted >= 0 && unconverted < loading->action.size) {
if (unconverted == -1) {
order->action = ACTION_NONE;
} else if (unconverted >= 0 && unconverted < loading->action.size) {
/* Look up what action id the unconverted number represents. */
order->action = loading->action.order[unconverted];
} else {
......
case ORDER_LAST:
break;
}
if (actions[j] == ACTION_NONE) {
actions[j] = -1;
}
}
orders[len] = dirs[len] = activities[len] = '\0';
......
"%s.action_vec,%d",
unitstr, j);
if (unconverted >= 0 && unconverted < loading->action.size) {
if (unconverted == -1) {
order->action = ACTION_NONE;
} else if (unconverted >= 0 && unconverted < loading->action.size) {
/* Look up what action id the unconverted number represents. */
order->action = loading->action.order[unconverted];
} else {
......
case ORDER_LAST:
break;
}
if (action_buf[j] == ACTION_NONE) {
action_buf[j] = -1;
}
}
orders_buf[len] = dir_buf[len] = act_buf[len] = '\0';
(3-3/3)