1
0
mirror of https://github.com/OpenTTD/OpenTTD synced 2026-01-20 02:42:42 +01:00

Codechange: strongly type GroupID

This commit is contained in:
Rubidium
2025-01-19 17:52:52 +01:00
committed by rubidium42
parent 798e9f229c
commit 1e24b41f22
7 changed files with 21 additions and 20 deletions

View File

@@ -3335,7 +3335,7 @@ bool AfterLoadGame()
Company *c = Company::Get(g->owner);
if (IsSavegameVersionBefore(SLV_GROUP_NUMBERS)) {
/* Use the index as group number when converting old savegames. */
g->number = c->freegroups.UseID(g->index);
g->number = c->freegroups.UseID(g->index.base());
} else {
c->freegroups.UseID(g->number);
}