mirror of
https://github.com/vcmi/vcmi.git
synced 2025-06-15 00:05:02 +02:00
Large rewrite of adventure map objects:
- replaced CDefObjInfo with ObjectTemplate class - ObjectTempate is a direct member of objects instead of pointer with shared ownership across CMap, handler and game objects - simplified handling of objects that can change appearance (e.g. towns) - all object queries regarding object appearance/blockmaps use h3m pos instead of relative positions - removed need of modhandler::reload - cleanup of some old code
This commit is contained in:
@ -161,7 +161,7 @@ void CMapGenerator::genTowns()
|
||||
if(townId == CMapGenOptions::CPlayerSettings::RANDOM_TOWN) townId = gen.getInteger(0, 8); // Default towns
|
||||
town->subID = townId;
|
||||
town->tempOwner = owner;
|
||||
town->defInfo = VLC->dobjinfo->gobjs[town->ID][town->subID];
|
||||
town->appearance = VLC->dobjinfo->pickCandidates(town->ID, town->subID, map->getTile(townPos[side]).terType).front();
|
||||
town->builtBuildings.insert(BuildingID::FORT);
|
||||
town->builtBuildings.insert(BuildingID::DEFAULT);
|
||||
editManager->insertObject(town, int3(townPos[side].x, townPos[side].y + (i / 2) * 5, 0));
|
||||
|
Reference in New Issue
Block a user