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

Function StationHandleSmallTick

src/station_cmd.cpp:4331–4340  ·  view source on GitHub ↗

called for every station each tick */

Source from the content-addressed store, hash-verified

4329
4330/* called for every station each tick */
4331static void StationHandleSmallTick(BaseStation *st)
4332{
4333 if (st->facilities.Test(StationFacility::Waypoint) || !st->IsInUse()) return;
4334
4335 uint8_t b = st->delete_ctr + 1;
4336 if (b >= Ticks::STATION_RATING_TICKS) b = 0;
4337 st->delete_ctr = b;
4338
4339 if (b == 0) UpdateStationRating(Station::From(st));
4340}
4341
4342void OnTick_Station()
4343{

Callers 1

OnTick_StationFunction · 0.85

Calls 3

UpdateStationRatingFunction · 0.85
TestMethod · 0.80
IsInUseMethod · 0.80

Tested by

no test coverage detected