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

Method Leave

src/roadstop.cpp:203–213  ·  view source on GitHub ↗

* Leave the road stop * @param rv the vehicle that leaves the stop */

Source from the content-addressed store, hash-verified

201 * @param rv the vehicle that leaves the stop
202 */
203void RoadStop::Leave(RoadVehicle *rv)
204{
205 if (IsBayRoadStopTile(rv->tile)) {
206 /* Vehicle is leaving a road stop tile, mark bay as free */
207 this->FreeBay(HasBit(rv->state, RVS_USING_SECOND_BAY));
208 this->SetEntranceBusy(false);
209 } else {
210 /* Otherwise just leave the drive through's entry cache. */
211 this->GetEntry(DirToDiagDir(rv->direction)).Leave(rv);
212 }
213}
214
215/**
216 * Enter the road stop

Callers 4

PreDestructorMethod · 0.80
DeleteLastRoadVehFunction · 0.80
CrashMethod · 0.80

Calls 5

FreeBayMethod · 0.95
SetEntranceBusyMethod · 0.95
IsBayRoadStopTileFunction · 0.85
HasBitFunction · 0.85
DirToDiagDirFunction · 0.85

Tested by

no test coverage detected