equal
deleted
inserted
replaced
21 #include "vehicle_gui.h" |
21 #include "vehicle_gui.h" |
22 #include "table/sprites.h" |
22 #include "table/sprites.h" |
23 #include "newgrf_engine.h" |
23 #include "newgrf_engine.h" |
24 #include "newgrf_callbacks.h" |
24 #include "newgrf_callbacks.h" |
25 #include "newgrf_text.h" |
25 #include "newgrf_text.h" |
|
26 #include "newgrf_sound.h" |
26 #include "date.h" |
27 #include "date.h" |
27 |
28 |
28 static bool AirportMove(Vehicle *v, const AirportFTAClass *Airport); |
29 static bool AirportMove(Vehicle *v, const AirportFTAClass *Airport); |
29 static bool AirportSetBlocks(Vehicle *v, AirportFTA *current_pos, const AirportFTAClass *Airport); |
30 static bool AirportSetBlocks(Vehicle *v, AirportFTA *current_pos, const AirportFTAClass *Airport); |
30 static bool AirportHasBlock(Vehicle *v, AirportFTA *current_pos, const AirportFTAClass *Airport); |
31 static bool AirportHasBlock(Vehicle *v, AirportFTA *current_pos, const AirportFTAClass *Airport); |
856 InvalidateWindow(WC_VEHICLE_DETAILS, v->index); |
857 InvalidateWindow(WC_VEHICLE_DETAILS, v->index); |
857 } |
858 } |
858 |
859 |
859 static void PlayAircraftSound(const Vehicle* v) |
860 static void PlayAircraftSound(const Vehicle* v) |
860 { |
861 { |
861 SndPlayVehicleFx(AircraftVehInfo(v->engine_type)->sfx, v); |
862 if (!PlayVehicleSound(v, VSE_START)) { |
|
863 SndPlayVehicleFx(AircraftVehInfo(v->engine_type)->sfx, v); |
|
864 } |
862 } |
865 } |
863 |
866 |
864 static bool UpdateAircraftSpeed(Vehicle *v) |
867 static bool UpdateAircraftSpeed(Vehicle *v) |
865 { |
868 { |
866 uint spd = v->acceleration * 2; |
869 uint spd = v->acceleration * 2; |
1424 } |
1427 } |
1425 |
1428 |
1426 static void AircraftLandAirplane(Vehicle *v) |
1429 static void AircraftLandAirplane(Vehicle *v) |
1427 { |
1430 { |
1428 AircraftLand(v); |
1431 AircraftLand(v); |
1429 SndPlayVehicleFx(SND_17_SKID_PLANE, v); |
1432 if (!PlayVehicleSound(v, VSE_TOUCHDOWN)) { |
|
1433 SndPlayVehicleFx(SND_17_SKID_PLANE, v); |
|
1434 } |
1430 MaybeCrashAirplane(v); |
1435 MaybeCrashAirplane(v); |
1431 } |
1436 } |
1432 |
1437 |
1433 // set the right pos when heading to other airports after takeoff |
1438 // set the right pos when heading to other airports after takeoff |
1434 static void AircraftNextAirportPos_and_Order(Vehicle *v) |
1439 static void AircraftNextAirportPos_and_Order(Vehicle *v) |