diff options
Diffstat (limited to 'src/Physics/Explodinator.cpp')
-rw-r--r-- | src/Physics/Explodinator.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Physics/Explodinator.cpp b/src/Physics/Explodinator.cpp index ca8b82b9b..b3e8f58f1 100644 --- a/src/Physics/Explodinator.cpp +++ b/src/Physics/Explodinator.cpp @@ -67,7 +67,7 @@ namespace Explodinator } } - return static_cast<float>(Unobstructed) / Total; + return (Total == 0) ? 0 : (static_cast<float>(Unobstructed) / Total); } /** Applies distance-based damage and knockback to all entities within the explosion's effect range. */ @@ -179,7 +179,7 @@ namespace Explodinator // The total displacement the ray must travel. const auto TraceDisplacement = (a_Destination - a_Origin); - // The displacement that they ray in one iteration step should travel. + // The displacement that the ray in one iteration step should travel. const auto Step = TraceDisplacement.NormalizeCopy() * StepUnit; // Loop until we've reached the prescribed destination: |