Feature #598 » 0070-savegame-Save-ACTION_NONE-as-1.patch
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';
|
||
- « Previous
- 1
- 2
- 3
- Next »