diff options
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); } |