From 99da45988a70436692c5062e50b4239e4d948f66 Mon Sep 17 00:00:00 2001 From: rubidium Date: Thu, 2 Aug 2007 21:19:07 +0000 Subject: (svn r10756) -Codechange: use vehicle->IsValid in favour of IsValidVehicle(vehicle). --- src/ai/default/default.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/ai/default') 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); } -- cgit v1.2.3-70-g09d2