Skip to content

Commit

Permalink
floor difficulty_mult at 0.1 for bad wp
Browse files Browse the repository at this point in the history
  • Loading branch information
osuphobia authored Dec 29, 2024
1 parent f8dc384 commit 6631990
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/weakpoint.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -552,7 +552,7 @@ float weakpoint::hit_chance( const weakpoint_attack &attack ) const
} else {
// Use erfc if the wp does not benefit the attacker.
diff = attack.wp_skill - std::max( difficulty.of( attack ) + 10.0f, 10.0f );
difficulty_mult = 0.5f * erfc( diff / ( 2.0f * sqrt( 2.0f ) ) );
difficulty_mult = std::max( 0.5f * erfc( diff / ( 2.0f * sqrt( 2.0f ) ) ), 0.1f );
final_coverage = coverage;
}

Expand Down

0 comments on commit 6631990

Please sign in to comment.