diff options
Diffstat (limited to 'src/ai')
-rw-r--r-- | src/ai/default/default.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/ai/default/default.cpp b/src/ai/default/default.cpp index b28e2a2b8..87306b6bc 100644 --- a/src/ai/default/default.cpp +++ b/src/ai/default/default.cpp @@ -261,8 +261,8 @@ static EngineID AiChooseTrainToReplaceWith(const Player* p, const Vehicle* v) const Vehicle* u = v; int num = 0; - while (++num, u->next != NULL) { - u = u->next; + while (++num, u->Next() != NULL) { + u = u->Next(); } // XXX: check if a wagon @@ -2496,7 +2496,7 @@ handle_nocash: // Sell a vehicle if the train is double headed. v = GetVehicle(loco_id); - if (v->next != NULL) { + if (v->Next() != NULL) { i = p->ai.wagon_list[p->ai.num_wagons * 2 - 2]; p->ai.wagon_list[p->ai.num_wagons * 2 - 2] = INVALID_VEHICLE; DoCommand(tile, i, 0, DC_EXEC, CMD_SELL_RAIL_WAGON); |