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

Function CheckCompatibleRail

src/train_cmd.cpp:3064–3068  ·  view source on GitHub ↗

Check if the vehicle is compatible with the specified tile */

Source from the content-addressed store, hash-verified

3062
3063/* Check if the vehicle is compatible with the specified tile */
3064static inline bool CheckCompatibleRail(const Train *v, TileIndex tile)
3065{
3066 return IsTileOwner(tile, v->owner) &&
3067 (!v->IsFrontEngine() || v->compatible_railtypes.Test(GetRailType(tile)));
3068}
3069
3070/** Data structure for storing engine speed changes of an acceleration type. */
3071struct AccelerationSlowdownParams {

Callers 3

TrainControllerFunction · 0.85
TrainCheckIfLineEndsFunction · 0.85

Calls 4

IsTileOwnerFunction · 0.85
GetRailTypeFunction · 0.85
IsFrontEngineMethod · 0.80
TestMethod · 0.80

Tested by

no test coverage detected