diff --git a/lib/registerTypes/RegisterTypes.h b/lib/registerTypes/RegisterTypes.h index 6bf06044b..17e46c54c 100644 --- a/lib/registerTypes/RegisterTypes.h +++ b/lib/registerTypes/RegisterTypes.h @@ -142,11 +142,11 @@ void registerTypesMapObjectTypes(Serializer &s) s.template registerType(); s.template registerType(); s.template registerType(); + s.template registerType(); s.template registerType(); s.template registerType(); s.template registerType(); - s.template registerType(); //new types (other than netpacks) must register here //order of type registration is critical for loading old savegames } diff --git a/lib/rmg/TownPlacer.cpp b/lib/rmg/TownPlacer.cpp index 30212c872..6aff7a02d 100644 --- a/lib/rmg/TownPlacer.cpp +++ b/lib/rmg/TownPlacer.cpp @@ -138,6 +138,7 @@ int3 TownPlacer::placeMainTown(ObjectManager & manager, CGTownInstance & town) { //towns are big objects and should be centered around visitable position rmg::Object rmgObject(town); + rmgObject.setTemplate(zone.getTerrainType()); auto position = manager.findPlaceForObject(zone.areaPossible(), rmgObject, [this](const int3 & t) { float distance = zone.getPos().dist2dSQ(t);