1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-17 20:13:07 +01:00

Introduce constant for ticks per month (#13253)

This commit is contained in:
Hielke Morsink
2020-10-21 02:05:27 +02:00
committed by GitHub
parent 9dcbf6d4e6
commit 257ada4617
4 changed files with 5 additions and 4 deletions

View File

@@ -1299,7 +1299,7 @@ static int32_t cc_for_date([[maybe_unused]] InteractiveConsole& console, [[maybe
if (argv.size() <= 2)
{
day = std::clamp(
gDateMonthTicks / (0x10000 / days_in_month[month - 1]) + 1, 1, static_cast<int>(days_in_month[month - 1]));
gDateMonthTicks / (TICKS_PER_MONTH / days_in_month[month - 1]) + 1, 1, static_cast<int>(days_in_month[month - 1]));
}
// YYYY MM DD (year, month, and day provided)