src/ai/api/ai_vehicle.cpp
branchnoai
changeset 9723 eee46cb39750
parent 9711 c8b427215c9d
child 9724 b39bc69bb2f2
equal deleted inserted replaced
9722:ebf0ece7d8f6 9723:eee46cb39750
     4 
     4 
     5 #include "ai_vehicle.hpp"
     5 #include "ai_vehicle.hpp"
     6 #include "ai_engine.hpp"
     6 #include "ai_engine.hpp"
     7 #include "ai_cargo.hpp"
     7 #include "ai_cargo.hpp"
     8 #include "ai_order.hpp"
     8 #include "ai_order.hpp"
     9 #include "../../command.h"
     9 #include "../../command_func.h"
    10 #include "../../vehicle.h"
       
    11 #include "../../depot.h"
    10 #include "../../depot.h"
    12 #include "../../engine.h"
    11 #include "../../engine.h"
    13 #include "../../player.h"
    12 #include "../../player.h"
    14 #include "../../aircraft.h"
    13 #include "../../aircraft.h"
    15 #include "../../strings.h"
    14 #include "../../strings_func.h"
       
    15 #include "../../core/alloc_func.hpp"
    16 #include "table/strings.h"
    16 #include "table/strings.h"
    17 
    17 
    18 /* static */ bool AIVehicle::IsValidVehicle(VehicleID vehicle_id)
    18 /* static */ bool AIVehicle::IsValidVehicle(VehicleID vehicle_id)
    19 {
    19 {
    20 	return ::IsValidVehicleID(vehicle_id) && ::GetVehicle(vehicle_id)->owner == _current_player && GetVehicle(vehicle_id)->IsPrimaryVehicle();
    20 	return ::IsValidVehicleID(vehicle_id) && ::GetVehicle(vehicle_id)->owner == _current_player && GetVehicle(vehicle_id)->IsPrimaryVehicle();