diff options
author | rubidium <rubidium@openttd.org> | 2007-08-02 21:19:07 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2007-08-02 21:19:07 +0000 |
commit | 99da45988a70436692c5062e50b4239e4d948f66 (patch) | |
tree | c9214850b82261724c3e006bdb90aae810fb06bb /src/ai/default | |
parent | 032de036dd612210c45926b26ff8afa9d3ed4e5c (diff) | |
download | openttd-99da45988a70436692c5062e50b4239e4d948f66.tar.xz |
(svn r10756) -Codechange: use vehicle->IsValid in favour of IsValidVehicle(vehicle).
Diffstat (limited to 'src/ai/default')
-rw-r--r-- | src/ai/default/default.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/ai/default/default.cpp b/src/ai/default/default.cpp index 5df2b5930..7235ab704 100644 --- a/src/ai/default/default.cpp +++ b/src/ai/default/default.cpp @@ -426,7 +426,7 @@ static void AiStateCheckReplaceVehicle(Player *p) { const Vehicle* v = p->ai.cur_veh; - if (!IsValidVehicle(v) || + if (!v->IsValid() || v->owner != _current_player || v->type > VEH_SHIP || _veh_check_replace_proc[v->type - VEH_TRAIN](p, v) == INVALID_ENGINE) { @@ -443,7 +443,7 @@ static void AiStateDoReplaceVehicle(Player *p) p->ai.state = AIS_VEH_LOOP; // vehicle is not owned by the player anymore, something went very wrong. - if (!IsValidVehicle(v) || v->owner != _current_player) return; + if (!v->IsValid() || v->owner != _current_player) return; _veh_do_replace_proc[v->type - VEH_TRAIN](p); } |