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

Function IsValidTrackdirForRoadVehicle

src/track_func.h:40–43  ·  view source on GitHub ↗

* Checks if a Trackdir is valid for road vehicles. * * @param trackdir The value to check * @return true if the given value is a valid Trackdir * @note Use this in an assert() */

Source from the content-addressed store, hash-verified

38 * @note Use this in an assert()
39 */
40inline bool IsValidTrackdirForRoadVehicle(Trackdir trackdir)
41{
42 return trackdir < TRACKDIR_END;
43}
44
45/**
46 * Checks if a Trackdir is valid for non-road vehicles.

Callers 5

ReverseTrackdirFunction · 0.85
TrackdirToExitdirFunction · 0.85
IsReversingRoadTrackdirFunction · 0.85
IsStraightRoadTrackdirFunction · 0.85
IsUphillTrackdirFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected