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

Method Tick

src/aircraft_cmd.cpp:2134–2154  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2132}
2133
2134bool Aircraft::Tick()
2135{
2136 if (!this->IsNormalAircraft()) return true;
2137
2138 PerformanceAccumulator framerate(PFE_GL_AIRCRAFT);
2139
2140 this->tick_counter++;
2141
2142 if (!this->vehstatus.Test(VehState::Stopped)) this->running_ticks++;
2143
2144 if (this->subtype == AIR_HELICOPTER) HelicopterTickHandler(this);
2145
2146 this->current_order_time++;
2147
2148 for (uint i = 0; i != 2; i++) {
2149 /* stop if the aircraft was deleted */
2150 if (!AircraftEventHandler(this, i)) return false;
2151 }
2152
2153 return true;
2154}
2155
2156
2157/**

Callers

nothing calls this directly

Calls 4

IsNormalAircraftMethod · 0.95
HelicopterTickHandlerFunction · 0.85
AircraftEventHandlerFunction · 0.85
TestMethod · 0.80

Tested by

no test coverage detected