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 | cb7eaff3534c1d18c9c8bc06be04ceb437d97765 (patch) | |
tree | 141633b357757cb790c904dc033f8479d58ba5e5 /src/ai/default | |
parent | ac5fde61fb03059daee4b505dcaad84f21b93857 (diff) | |
download | openttd-cb7eaff3534c1d18c9c8bc06be04ceb437d97765.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); |