equal
deleted
inserted
replaced
164 VRF_EL_ENGINE_ALLOWED_NORMAL_RAIL = 6, |
164 VRF_EL_ENGINE_ALLOWED_NORMAL_RAIL = 6, |
165 }; |
165 }; |
166 |
166 |
167 struct VehicleAir { |
167 struct VehicleAir { |
168 uint16 crashed_counter; |
168 uint16 crashed_counter; |
|
169 uint16 cached_max_speed; |
169 byte pos; |
170 byte pos; |
170 byte previous_pos; |
171 byte previous_pos; |
171 StationID targetairport; |
172 StationID targetairport; |
172 byte state; |
173 byte state; |
173 }; |
174 }; |
405 int32 MaybeReplaceVehicle(Vehicle *v, bool check, bool display_costs); |
406 int32 MaybeReplaceVehicle(Vehicle *v, bool check, bool display_costs); |
406 |
407 |
407 /* Flags to add to p2 for goto depot commands */ |
408 /* Flags to add to p2 for goto depot commands */ |
408 /* Note: bits 8-10 are used for VLW flags */ |
409 /* Note: bits 8-10 are used for VLW flags */ |
409 enum { |
410 enum { |
410 DEPOT_SERVICE = (1 << 0), // The vehicle will leave the depot right after arrival (serivce only) |
411 DEPOT_SERVICE = (1 << 0), // The vehicle will leave the depot right after arrival (serivce only) |
411 DEPOT_MASS_SEND = (1 << 1), // Tells that it's a mass send to depot command (type in VLW flag) |
412 DEPOT_MASS_SEND = (1 << 1), // Tells that it's a mass send to depot command (type in VLW flag) |
412 DEPOT_DONT_CANCEL = (1 << 2), // Don't cancel current goto depot command if any |
413 DEPOT_DONT_CANCEL = (1 << 2), // Don't cancel current goto depot command if any |
413 DEPOT_LOCATE_HANGAR = (1 << 3), // Find another airport if the target one lacks a hangar |
414 DEPOT_LOCATE_HANGAR = (1 << 3), // Find another airport if the target one lacks a hangar |
414 }; |
415 }; |
415 |
416 |
548 VARDEF VehicleID _new_vehicle_id; |
549 VARDEF VehicleID _new_vehicle_id; |
549 VARDEF uint16 _returned_refit_capacity; |
550 VARDEF uint16 _returned_refit_capacity; |
550 |
551 |
551 static const VehicleID INVALID_VEHICLE = 0xFFFF; |
552 static const VehicleID INVALID_VEHICLE = 0xFFFF; |
552 |
553 |
|
554 const struct Livery *GetEngineLivery(EngineID engine_type, PlayerID player, EngineID parent_engine_type, const Vehicle *v); |
|
555 |
553 /** |
556 /** |
554 * Get the colour map for an engine. This used for unbuilt engines in the user interface. |
557 * Get the colour map for an engine. This used for unbuilt engines in the user interface. |
555 * @param engine_type ID of engine |
558 * @param engine_type ID of engine |
556 * @param player ID of player |
559 * @param player ID of player |
557 * @return A ready-to-use palette modifier |
560 * @return A ready-to-use palette modifier |