1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-25 22:42:04 +02:00

Reverting r2327

http://forum.vcmi.eu/viewtopic.php?t=410
This commit is contained in:
Michał W. Urbańczyk
2011-08-30 06:19:07 +00:00
parent 33719696d8
commit 835bd1fbeb
7 changed files with 501 additions and 487 deletions

View File

@@ -62,6 +62,7 @@ void CTownHandler::loadStructures()
// Read buildings coordinates for that city
BOOST_FOREACH(const JsonNode &node, town_node["defnames"].Vector()) {
Structure *vinya = new Structure;
const JsonNode *value;
vinya->group = -1;
vinya->townID = townID;
@@ -72,8 +73,13 @@ void CTownHandler::loadStructures()
vinya->pos.y = node["y"].Float();
vinya->pos.z = 0;
vinya->borderName = node["border"].String();
vinya->areaName = node["area"].String();
value = &node["border"];
if (!value->isNull())
vinya->borderName = value->String();
value = &node["area"];
if (!value->isNull())
vinya->areaName = value->String();
town[vinya->ID] = vinya;
}