Skip to content

Commit

Permalink
Correct some mistakes
Browse files Browse the repository at this point in the history
  • Loading branch information
Broxzier authored and ZehMatt committed Feb 18, 2022
1 parent ad0a2a8 commit 5c5f86a
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/openrct2-ui/windows/Ride.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5563,7 +5563,7 @@ static void WindowRideMeasurementsPaint(rct_window* w, rct_drawpixelinfo* dpi)
int32_t numTimes = 0;
for (int32_t i = 0; i < ride->num_stations; i++)
{
StationIndex stationIndex = StationIndex::FromUnderlying(i);
StationIndex stationIndex = StationIndex::FromUnderlying(numTimes);
auto time = ride->GetStation(stationIndex).SegmentTime;
if (time != 0)
{
Expand Down
1 change: 1 addition & 0 deletions src/openrct2/ride/Ride.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3609,6 +3609,7 @@ void Ride::MoveTrainsToBlockBrakes(TrackElement* firstBlock)
static bool ride_initialise_cable_lift_track(Ride* ride, bool isApplying)
{
CoordsXYZ location;
location.SetNull();
for (const auto& station : ride->GetStations())
{
location = station.GetStart();
Expand Down
2 changes: 1 addition & 1 deletion src/openrct2/ride/Vehicle.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2365,7 +2365,7 @@ void Vehicle::UpdateWaitingToDepart()
if (curRide == nullptr)
return;

const auto& currentStation = curRide->GetStation(curRide->current_test_station);
const auto& currentStation = curRide->GetStation(current_station);

bool shouldBreak = false;
if (curRide->lifecycle_flags & RIDE_LIFECYCLE_BROKEN_DOWN)
Expand Down

0 comments on commit 5c5f86a

Please sign in to comment.