MCPcopy Create free account
hub / github.com/OpenTTD/OpenTTD / HandleAircraftEnterHangar

Function HandleAircraftEnterHangar

src/aircraft_cmd.cpp:571–585  ·  view source on GitHub ↗

* Handle Aircraft specific tasks when an Aircraft enters a hangar * @param *v Vehicle that enters the hangar */

Source from the content-addressed store, hash-verified

569 * @param *v Vehicle that enters the hangar
570 */
571void HandleAircraftEnterHangar(Aircraft *v)
572{
573 v->subspeed = 0;
574 v->progress = 0;
575
576 Aircraft *u = v->Next();
577 u->vehstatus.Set(VehState::Hidden);
578 u = u->Next();
579 if (u != nullptr) {
580 u->vehstatus.Set(VehState::Hidden);
581 u->cur_speed = 0;
582 }
583
584 SetAircraftPosition(v, v->x_pos, v->y_pos, v->z_pos);
585}
586
587static void PlayAircraftSound(const Vehicle *v)
588{

Callers 1

VehicleEnterDepotFunction · 0.85

Calls 3

SetAircraftPositionFunction · 0.85
NextMethod · 0.45
SetMethod · 0.45

Tested by

no test coverage detected