mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-15 11:03:00 +01:00
Fix #13234: Wrong vehicle weight after using Remove All Guests cheat
This commit is contained in:
committed by
GitHub
parent
6ac6db489c
commit
fc0b5fde27
@@ -22,6 +22,7 @@
|
||||
- Change: [#21214] Wacky Worlds and Time Twister’s scenario names now match their park names.
|
||||
- Change: [#21991] UI themes JSON now use colour names and a translucency bool, instead of a number (old themes still work).
|
||||
- Change: [#22057] Reorder Time Twister’s scenarios and adjust their difficulty classification.
|
||||
- Fix: [#13234] Vehicle weight sometimes wrong after using Remove All Guests cheat.
|
||||
- Fix: [#13294] Map corners are cut off in some directions (original bug).
|
||||
- Fix: [#14630] Non-ASCII thousands and decimal separators not processed correctly.
|
||||
- Fix: [#21974] No reason specified when attempting to place benches, lamps, or bins on path with no unconnected edges (original bug).
|
||||
|
||||
@@ -711,10 +711,14 @@ void CheatSetAction::RemoveAllGuests() const
|
||||
for (Vehicle* vehicle = TryGetEntity<Vehicle>(trainIndex); vehicle != nullptr;
|
||||
vehicle = TryGetEntity<Vehicle>(vehicle->next_vehicle_on_train))
|
||||
{
|
||||
auto i = 0;
|
||||
for (auto& peepInTrainIndex : vehicle->peep)
|
||||
{
|
||||
if (i >= vehicle->num_peeps)
|
||||
break;
|
||||
|
||||
auto peep = TryGetEntity<Guest>(peepInTrainIndex);
|
||||
if (peep != nullptr)
|
||||
if (peep != nullptr && peep->CurrentRide == ride.id)
|
||||
{
|
||||
if ((peep->State == PeepState::OnRide && peep->RideSubState == PeepRideSubState::OnRide)
|
||||
|| (peep->State == PeepState::LeavingRide && peep->RideSubState == PeepRideSubState::LeaveVehicle))
|
||||
@@ -723,6 +727,7 @@ void CheatSetAction::RemoveAllGuests() const
|
||||
}
|
||||
}
|
||||
peepInTrainIndex = EntityId::GetNull();
|
||||
i++;
|
||||
}
|
||||
|
||||
vehicle->num_peeps = 0;
|
||||
|
||||
Reference in New Issue
Block a user