Codechange: strongly type ObjectID

This commit is contained in:
Rubidium
2025-01-31 21:46:25 +01:00
committed by rubidium42
parent c311e6e4a9
commit cb3db3cedd
4 changed files with 9 additions and 7 deletions

View File

@@ -2113,7 +2113,7 @@ bool AfterLoadGame()
o->location.h = size;
o->build_date = TimerGameCalendar::date;
o->town = type == OBJECT_STATUE ? Town::Get(t.m2()) : CalcClosestTownFromTile(t, UINT_MAX);
t.m2() = o->index;
t.m2() = o->index.base();
Object::IncTypeCount(type);
} else {
/* We're at an offset, so get the ID from our "root". */