Skip to content

Commit

Permalink
Fixed an issue with reference provinces
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrettin committed May 27, 2016
1 parent 637aeb5 commit 502a833
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/stratagus/grand_strategy.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion src/stratagus/script_province.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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.");
}
Expand Down

0 comments on commit 502a833

Please sign in to comment.