Add: [NewGRF] Airport animation trigger for plane landing (#6334, patch by Supercheese)
This commit is contained in:

committed by
Charles Pigott

parent
f37304f9f5
commit
4e9e115760
@@ -37,6 +37,7 @@
|
||||
#include "core/backup_type.hpp"
|
||||
#include "zoom_func.h"
|
||||
#include "disaster_vehicle.h"
|
||||
#include "newgrf_airporttiles.h"
|
||||
#include "framerate_type.h"
|
||||
|
||||
#include "table/strings.h"
|
||||
@@ -1370,8 +1371,14 @@ static void AircraftEntersTerminal(Aircraft *v)
|
||||
*/
|
||||
static void AircraftLandAirplane(Aircraft *v)
|
||||
{
|
||||
Station *st = Station::Get(v->targetairport);
|
||||
|
||||
TileIndex vt = TileVirtXY(v->x_pos, v->y_pos);
|
||||
|
||||
v->UpdateDeltaXY();
|
||||
|
||||
AirportTileAnimationTrigger(st, vt, AAT_STATION_AIRPLANE_LAND);
|
||||
|
||||
if (!PlayVehicleSound(v, VSE_TOUCHDOWN)) {
|
||||
SndPlayVehicleFx(SND_17_SKID_PLANE, v);
|
||||
}
|
||||
|
@@ -51,6 +51,7 @@ enum AirpAnimationTrigger {
|
||||
AAT_STATION_NEW_CARGO, ///< Triggered when new cargo arrives at the station (for all tiles at the same time).
|
||||
AAT_STATION_CARGO_TAKEN, ///< Triggered when a cargo type is completely removed from the station (for all tiles at the same time).
|
||||
AAT_STATION_250_TICKS, ///< Triggered every 250 ticks (for all tiles at the same time).
|
||||
AAT_STATION_AIRPLANE_LAND, ///< Triggered when an airplane (not a helicopter) touches down at the airport (for all tiles at the same time).
|
||||
};
|
||||
|
||||
/** Animation triggers for objects. */
|
||||
|
Reference in New Issue
Block a user