@@ -167,13 +167,13 @@
case TOWN_GROWTH_NONE:
growth_rate = TOWN_GROWTH_RATE_NONE;
break;
default:
EnforcePrecondition(false, days_between_town_growth <= MAX_TOWN_GROWTH_TICKS);
EnforcePrecondition(false, (days_between_town_growth * DAY_TICKS / TOWN_GROWTH_TICKS) <= MAX_TOWN_GROWTH_TICKS);
/* Don't use growth_rate 0 as it means GROWTH_NORMAL */
growth_rate = max(days_between_town_growth * DAY_TICKS, 2u) - 1;
}
return ScriptObject::DoCommand(::Town::Get(town_id)->xy, town_id, growth_rate, CMD_TOWN_GROWTH_RATE);
Status change: