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

Function GetEntryDirection

src/roadstop.cpp:307–314  ·  view source on GitHub ↗

* Get the DiagDirection for entering the drive through stop from the given 'side' (east or west) on the given axis. * @param east Enter from the east when true or from the west when false. * @param axis The axis of the drive through stop. * @return The DiagDirection the vehicles far when entering 'our' side of the drive through stop. */

Source from the content-addressed store, hash-verified

305 * @return The DiagDirection the vehicles far when entering 'our' side of the drive through stop.
306 */
307static DiagDirection GetEntryDirection(bool east, Axis axis)
308{
309 switch (axis) {
310 case AXIS_X: return east ? DIAGDIR_NE : DIAGDIR_SW;
311 case AXIS_Y: return east ? DIAGDIR_SE : DIAGDIR_NW;
312 default: NOT_REACHED();
313 }
314}
315
316/**
317 * Rebuild, from scratch, the vehicles and other metadata on this stop.

Callers 1

RebuildMethod · 0.85

Calls 1

NOT_REACHEDFunction · 0.85

Tested by

no test coverage detected