diff --git a/src/stratagus/grand_strategy.cpp b/src/stratagus/grand_strategy.cpp index 6965524d1..cfbd7d8d9 100644 --- a/src/stratagus/grand_strategy.cpp +++ b/src/stratagus/grand_strategy.cpp @@ -7256,6 +7256,7 @@ void InitializeGrandStrategyProvinces() province->Name = Provinces[i]->Name; province->World = Provinces[i]->World; if (Provinces[i]->ReferenceProvince != -1) { +// fprintf(stderr, "Setting the ReferenceProvince of province \"%s\" to \"%s\".\n", province->Name.c_str(), Provinces[Provinces[i]->ReferenceProvince]->Name.c_str()); province->ReferenceProvince = GetProvinceId(Provinces[Provinces[i]->ReferenceProvince]->Name); } province->Water = Provinces[i]->Water; diff --git a/src/stratagus/script_province.cpp b/src/stratagus/script_province.cpp index b30f9aa06..7867b9e56 100644 --- a/src/stratagus/script_province.cpp +++ b/src/stratagus/script_province.cpp @@ -226,7 +226,7 @@ static int CclDefineProvince(lua_State *l) } else if (!strcmp(value, "ReferenceProvince")) { CProvince *reference_province = GetProvince(LuaToString(l, -1)); if (reference_province != NULL) { - reference_province->ReferenceProvince = reference_province->ID; + province->ReferenceProvince = reference_province->ID; } else { LuaError(l, "Reference province doesn't exist."); }