aboutsummaryrefslogtreecommitdiff
path: root/src/openvic-simulation/map
diff options
context:
space:
mode:
author wvpm <24685035+wvpm@users.noreply.github.com>2024-10-28 21:06:29 +0100
committer GitHub <noreply@github.com>2024-10-28 21:06:29 +0100
commit0f2074fc51cfab930e2a672125c1625d9a47fb06 (patch)
tree252f7f8067d6f5715ee6c48f99bf1add49f60dca /src/openvic-simulation/map
parent8d9ff3266439c6a94c35fdf0d8a0642a2cb34de3 (diff)
parent1e714f86e40a72a0452b6a5c9148b6034e17b5a6 (diff)
Merge pull request #214 from OpenVicProject/provinces_contribute_to_controller_not_owner
Provinces contribute modifiers to controller, not owner
Diffstat (limited to 'src/openvic-simulation/map')
-rw-r--r--src/openvic-simulation/map/ProvinceInstance.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/openvic-simulation/map/ProvinceInstance.cpp b/src/openvic-simulation/map/ProvinceInstance.cpp
index 5bc798d..cbb23bd 100644
--- a/src/openvic-simulation/map/ProvinceInstance.cpp
+++ b/src/openvic-simulation/map/ProvinceInstance.cpp
@@ -238,8 +238,8 @@ void ProvinceInstance::update_modifier_sum(Date today, StaticModifierCache const
modifier_sum.add_modifier_nullcheck(terrain_type, province_source);
if constexpr (!ADD_OWNER_CONTRIBUTION) {
- if (owner != nullptr) {
- owner->contribute_province_modifier_sum(modifier_sum);
+ if (controller != nullptr) {
+ controller->contribute_province_modifier_sum(modifier_sum);
}
}
}