mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-01-18 13:14:34 +00:00
Revert: "Codechange: remove parameter which value can always be deduced" (#13183)
This reverts commit dfb74e25f7
.
This commit is contained in:
parent
2c740cf7e7
commit
2176d49a39
@ -360,15 +360,17 @@ static DiagDirection GetEntryDirection(bool east, Axis axis)
|
||||
/**
|
||||
* Rebuild, from scratch, the vehicles and other metadata on this stop.
|
||||
* @param rs the roadstop this entry is part of
|
||||
* @param side the side of the road stop to look at
|
||||
*/
|
||||
void RoadStop::Entry::Rebuild(const RoadStop *rs)
|
||||
void RoadStop::Entry::Rebuild(const RoadStop *rs, int side)
|
||||
{
|
||||
assert(HasBit(rs->status, RSSFB_BASE_ENTRY));
|
||||
|
||||
Axis axis = GetDriveThroughStopAxis(rs->xy);
|
||||
if (side == -1) side = (rs->east == this);
|
||||
|
||||
RoadStopEntryRebuilderHelper rserh;
|
||||
rserh.dir = GetEntryDirection(rs->east == this, axis);
|
||||
rserh.dir = GetEntryDirection(side, axis);
|
||||
|
||||
this->length = 0;
|
||||
TileIndexDiff offset = TileOffsByAxis(axis);
|
||||
@ -397,6 +399,6 @@ void RoadStop::Entry::CheckIntegrity(const RoadStop *rs) const
|
||||
assert(!IsDriveThroughRoadStopContinuation(rs->xy, rs->xy - TileOffsByAxis(GetDriveThroughStopAxis(rs->xy))));
|
||||
|
||||
Entry temp;
|
||||
temp.Rebuild(rs);
|
||||
temp.Rebuild(rs, rs->east == this);
|
||||
if (temp.length != this->length || temp.occupied != this->occupied) NOT_REACHED();
|
||||
}
|
||||
|
@ -62,7 +62,7 @@ struct RoadStop : RoadStopPool::PoolItem<&_roadstop_pool> {
|
||||
void Leave(const RoadVehicle *rv);
|
||||
void Enter(const RoadVehicle *rv);
|
||||
void CheckIntegrity(const RoadStop *rs) const;
|
||||
void Rebuild(const RoadStop *rs);
|
||||
void Rebuild(const RoadStop *rs, int side = -1);
|
||||
};
|
||||
|
||||
uint8_t status; ///< Current status of the Stop, @see RoadStopSatusFlag. Access using *Bay and *Busy functions.
|
||||
|
Loading…
Reference in New Issue
Block a user