(svn r16721) -Codechange: make Is/SetRoadVehicleFront, Is/Set/HasArticulatedPart member of RoadVehicle.

This commit is contained in:
rubidium
2009-07-02 08:59:27 +00:00
parent 77eaefb61c
commit 61e735ba4c
14 changed files with 76 additions and 72 deletions

View File

@@ -302,7 +302,7 @@ static bool DisasterTick_Ufo(DisasterVehicle *v)
RoadVehicle *u;
FOR_ALL_ROADVEHICLES(u) {
if (IsRoadVehFront(u)) {
if (u->IsRoadVehFront()) {
v->dest_tile = u->index;
v->age = 0;
return true;
@@ -314,7 +314,7 @@ static bool DisasterTick_Ufo(DisasterVehicle *v)
} else {
/* Target a vehicle */
RoadVehicle *u = RoadVehicle::Get(v->dest_tile);
assert(u != NULL && u->type == VEH_ROAD && IsRoadVehFront(u));
assert(u != NULL && u->type == VEH_ROAD && u->IsRoadVehFront());
uint dist = Delta(v->x_pos, u->x_pos) + Delta(v->y_pos, u->y_pos);