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

Function CheckReverseTrain

src/train_cmd.cpp:2966–2977  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2964
2965
2966static bool CheckReverseTrain(const Train *v)
2967{
2968 if (_settings_game.difficulty.line_reverse_mode != 0 ||
2969 v->track == TRACK_BIT_DEPOT || v->track == TRACK_BIT_WORMHOLE ||
2970 !(v->direction & 1)) {
2971 return false;
2972 }
2973
2974 assert(v->track != TRACK_BIT_NONE);
2975
2976 return YapfTrainCheckReverse(v);
2977}
2978
2979/**
2980 * Get the location of the next station to visit.

Callers 1

TrainLocoHandlerFunction · 0.85

Calls 1

YapfTrainCheckReverseFunction · 0.85

Tested by

no test coverage detected