diff options
author | rubidium <rubidium@openttd.org> | 2007-08-30 13:03:56 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2007-08-30 13:03:56 +0000 |
commit | 235ad4ab6bf3133517a7a779c398e30f51bdbbad (patch) | |
tree | 141633b357757cb790c904dc033f8479d58ba5e5 /src/ai/default | |
parent | 6edf2d3a1bd90619d0e5257becfd3df708fe3554 (diff) | |
download | openttd-235ad4ab6bf3133517a7a779c398e30f51bdbbad.tar.xz |
(svn r11003) -Codechange: replace Vehicle->next to Vehicle->Next() and Vehicle->SetNext() so we can trap instances that change a next pointer and (in the future) update the first/previous pointers based on that.
Diffstat (limited to 'src/ai/default')
-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); |