MCPcopy Create free account
hub / github.com/OpenRCT2/OpenRCT2 / IsBlockStart

Method IsBlockStart

src/openrct2/world/tile_element/TrackElement.cpp:40–57  ·  view source on GitHub ↗

* Checks if a track element is recognised as the beginning of a block. * A beginning of a block can be the end of a station, the end of a lift hill, * or a block brake. */

Source from the content-addressed store, hash-verified

38 * or a block brake.
39 */
40 bool TrackElement::IsBlockStart() const
41 {
42 switch (GetTrackType())
43 {
44 case TrackElemType::endStation:
45 case TrackElemType::cableLiftHill:
46 case TrackElemType::blockBrakes:
47 case TrackElemType::diagBlockBrakes:
48 return true;
49 case TrackElemType::up25ToFlat:
50 case TrackElemType::up60ToFlat:
51 case TrackElemType::diagUp25ToFlat:
52 case TrackElemType::diagUp60ToFlat:
53 return HasChain();
54 default:
55 return false;
56 }
57 }
58
59 bool TrackElement::IsStation() const
60 {

Callers 3

trackGetPreviousBlockFunction · 0.80
onPrepareDrawMethod · 0.80

Calls

no outgoing calls

Tested by 1

onPrepareDrawMethod · 0.64