mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-02-01 03:05:24 +01:00
* Check for correct peep state when removing mass * Add apply mass function * Increment network version * Fix #13234. Add to changelog
This commit is contained in:
@@ -644,7 +644,11 @@ void SetCheatAction::RemoveAllGuests() const
|
||||
auto peep = TryGetEntity<Guest>(peepInTrainIndex);
|
||||
if (peep != nullptr)
|
||||
{
|
||||
vehicle->mass -= peep->Mass;
|
||||
if ((peep->State == PeepState::OnRide && peep->RideSubState == PeepRideSubState::OnRide)
|
||||
|| (peep->State == PeepState::LeavingRide && peep->RideSubState == PeepRideSubState::LeaveVehicle))
|
||||
{
|
||||
vehicle->ApplyMass(-peep->Mass);
|
||||
}
|
||||
}
|
||||
peepInTrainIndex = SPRITE_INDEX_NULL;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user