File tree Expand file tree Collapse file tree 1 file changed +3
-7
lines changed Expand file tree Collapse file tree 1 file changed +3
-7
lines changed Original file line number Diff line number Diff line change @@ -569,12 +569,8 @@ float crime_fighting_efficiency(sys::state& state, dcon::province_id id) {
569
569
auto si = state.world .province_get_state_membership (id);
570
570
auto owner = state.world .province_get_nation_from_province_ownership (id);
571
571
if (si && owner)
572
- return (
573
- state.world .province_get_control_ratio (id)
574
- * state.defines .admin_efficiency_crimefight_percent
575
- +
576
- (1 - state.defines .admin_efficiency_crimefight_percent )
577
- * state.world .nation_get_administrative_efficiency (owner))
572
+ return state.world .province_get_control_ratio (id)
573
+ * (1 .f + state.world .nation_get_administrative_efficiency (owner))
578
574
* (
579
575
state.defines .max_crimefight_percent
580
576
- state.defines .min_crimefight_percent
@@ -1168,7 +1164,7 @@ void update_crimes(sys::state& state) {
1168
1164
1169
1165
auto chance = uint32_t (province::crime_fighting_efficiency (state, p) * 256 .0f );
1170
1166
auto rvalues = rng::get_random_pair (state, uint32_t ((p.index () << 2 ) + 1 ));
1171
- if ((rvalues.high & 0xFF ) > = chance) {
1167
+ if ((rvalues.high & 0xFF ) < = chance) {
1172
1168
if (state.world .province_get_crime (p)) {
1173
1169
if (!province::is_overseas (state, p))
1174
1170
state.world .nation_get_central_crime_count (owner) -= uint16_t (1 );
You can’t perform that action at this time.
0 commit comments