equal
deleted
inserted
replaced
198 |
198 |
199 const Vehicle *v = ::GetVehicle(vehicle_id); |
199 const Vehicle *v = ::GetVehicle(vehicle_id); |
200 byte vehstatus = v->vehstatus; |
200 byte vehstatus = v->vehstatus; |
201 |
201 |
202 if (vehstatus & ::VS_CRASHED) return AIVehicle::VS_CRASHED; |
202 if (vehstatus & ::VS_CRASHED) return AIVehicle::VS_CRASHED; |
203 if (vehstatus & ::VS_BROKEN) return AIVehicle::VS_BROKEN; |
203 if (v->breakdown_ctr != 0) return AIVehicle::VS_BROKEN; |
204 if (v->IsStoppedInDepot()) return AIVehicle::VS_IN_DEPOT; |
204 if (v->IsStoppedInDepot()) return AIVehicle::VS_IN_DEPOT; |
205 if (vehstatus & ::VS_STOPPED) return AIVehicle::VS_STOPPED; |
205 if (vehstatus & ::VS_STOPPED) return AIVehicle::VS_STOPPED; |
206 if (v->current_order.IsType(OT_LOADING)) return AIVehicle::VS_AT_STATION; |
206 if (v->current_order.IsType(OT_LOADING)) return AIVehicle::VS_AT_STATION; |
207 return AIVehicle::VS_RUNNING; |
207 return AIVehicle::VS_RUNNING; |
208 } |
208 } |