diff options
Diffstat (limited to 'universe/src')
-rw-r--r-- | universe/src/TurretType.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/universe/src/TurretType.cpp b/universe/src/TurretType.cpp index 0dc6be6..b64efd4 100644 --- a/universe/src/TurretType.cpp +++ b/universe/src/TurretType.cpp @@ -29,9 +29,10 @@ TurretType::range_modifier(const double distance) const double TurretType::effective_range() const { - const double target_falloff = std::sqrt(std::log2(0.01) / std::log2(falloff_intensity)); - const double one_percent_overflow = target_falloff * falloff_modifier * optimal_range; - return one_percent_overflow + optimal_range; + const double one_point = 1.0 / base_damage; + const double target_falloff = std::sqrt(std::log2(one_point) / std::log2(falloff_intensity)); + const double one_point_overflow = target_falloff * falloff_modifier * optimal_range; + return one_point_overflow + optimal_range; } |