Skip to content

Commit

Permalink
Fix miss cycle
Browse files Browse the repository at this point in the history
  • Loading branch information
SneakBug8 committed Jan 25, 2025
1 parent 4fdcc12 commit 7a17cb8
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/ai/ai.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -675,14 +675,23 @@ void update_influence_priorities(sys::state& state) {
continue;

auto natid = state.world.nation_get_identity_from_identity_holder(n.nation);
auto holdscores = false;
for(auto prov_owner : state.world.nation_get_province_ownership(t)) {
auto prov = prov_owner.get_province();

for(auto core : prov.get_core_as_province()) {
if(core.get_identity() == natid) {
continue; // holds our cores
holdscores = true;
break;
}
}

if(holdscores)
break;
}

if(holdscores) {
continue; // holds our cores
}

float weight = 0.0f;
Expand Down

0 comments on commit 7a17cb8

Please sign in to comment.