mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-21 14:02:59 +01:00
Allow 4 active awards for more than 1 month at a time
This commit is contained in:
@@ -606,6 +606,20 @@ void award_update_all()
|
||||
{
|
||||
PROFILED_FUNCTION();
|
||||
|
||||
// Decrease award times
|
||||
for (auto& award : _currentAwards)
|
||||
{
|
||||
--award.Time;
|
||||
}
|
||||
// Remove any 0 time awards
|
||||
auto res = std::remove_if(
|
||||
std::begin(_currentAwards), std::end(_currentAwards), [](const Award& award) { return award.Time == 0; });
|
||||
if (res != std::end(_currentAwards))
|
||||
{
|
||||
_currentAwards.erase(res, std::end(_currentAwards));
|
||||
window_invalidate_by_class(WindowClass::ParkInformation);
|
||||
}
|
||||
|
||||
// Only add new awards if park is open
|
||||
if (gParkFlags & PARK_FLAGS_PARK_OPEN)
|
||||
{
|
||||
@@ -639,19 +653,4 @@ void award_update_all()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Decrease award times
|
||||
for (auto& award : _currentAwards)
|
||||
{
|
||||
--award.Time;
|
||||
}
|
||||
|
||||
// Remove any 0 time awards
|
||||
auto res = std::remove_if(
|
||||
std::begin(_currentAwards), std::end(_currentAwards), [](const Award& award) { return award.Time == 0; });
|
||||
if (res != std::end(_currentAwards))
|
||||
{
|
||||
_currentAwards.erase(res, std::end(_currentAwards));
|
||||
window_invalidate_by_class(WindowClass::ParkInformation);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user