summaryrefslogtreecommitdiff
path: root/battles/src
diff options
context:
space:
mode:
Diffstat (limited to 'battles/src')
-rw-r--r--battles/src/BaseBattle.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/battles/src/BaseBattle.cpp b/battles/src/BaseBattle.cpp
index 604a607..eb75464 100644
--- a/battles/src/BaseBattle.cpp
+++ b/battles/src/BaseBattle.cpp
@@ -113,7 +113,7 @@ effective_damage(const universe::TurretType& def, const double distance)
{
const auto overflow = distance - def.optimal_range;
const auto falloff = std::max(0.0, overflow / def.optimal_range / def.falloff_modifier);
- return def.base_damage * std::pow(def.falloff_intensity, std::pow(falloff, 2));
+ return def.base_damage * std::round(std::pow(def.falloff_intensity, std::pow(falloff, 2)) * 1000) / 1000;
}