diff options
author | smatz <smatz@openttd.org> | 2009-05-26 22:45:48 +0000 |
---|---|---|
committer | smatz <smatz@openttd.org> | 2009-05-26 22:45:48 +0000 |
commit | 5a463c8347fe1e68ab31dda1425e9060d52bfbd6 (patch) | |
tree | 55f5c9de8dcbda6268d003b29af59650594ce27a /src/disaster_cmd.cpp | |
parent | 7ee882d03f4c41d8659ed82fd5be0d0efbae0a0c (diff) | |
download | openttd-5a463c8347fe1e68ab31dda1425e9060d52bfbd6.tar.xz |
(svn r16442) -Codechange: use new Vehicle accessors at more places
Diffstat (limited to 'src/disaster_cmd.cpp')
-rw-r--r-- | src/disaster_cmd.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/disaster_cmd.cpp b/src/disaster_cmd.cpp index 96735f199..3cc62d057 100644 --- a/src/disaster_cmd.cpp +++ b/src/disaster_cmd.cpp @@ -300,9 +300,9 @@ static bool DisasterTick_Ufo(DisasterVehicle *v) } v->current_order.SetDestination(1); - Vehicle *u; - FOR_ALL_VEHICLES(u) { - if (u->type == VEH_ROAD && IsRoadVehFront(u)) { + RoadVehicle *u; + FOR_ALL_ROADVEHICLES(u) { + if (IsRoadVehFront(u)) { v->dest_tile = u->index; v->age = 0; return true; @@ -938,10 +938,10 @@ void StartupDisasters() */ void ReleaseDisastersTargetingIndustry(IndustryID i) { - Vehicle *v; - FOR_ALL_VEHICLES(v) { + DisasterVehicle *v; + FOR_ALL_DISASTERVEHICLES(v) { /* primary disaster vehicles that have chosen target */ - if (v->type == VEH_DISASTER && (v->subtype == ST_AIRPLANE || v->subtype == ST_HELICOPTER)) { + if (v->subtype == ST_AIRPLANE || v->subtype == ST_HELICOPTER) { /* if it has chosen target, and it is this industry (yes, dest_tile is IndustryID here), set order to "leaving map peacefully" */ if (v->current_order.GetDestination() > 0 && v->dest_tile == i) v->current_order.SetDestination(3); } |