summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Physics/Explodinator.cpp4
-rw-r--r--src/Simulator/IncrementalRedstoneSimulator/TNTHandler.h2
2 files changed, 3 insertions, 3 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:
diff --git a/src/Simulator/IncrementalRedstoneSimulator/TNTHandler.h b/src/Simulator/IncrementalRedstoneSimulator/TNTHandler.h
index 2ac3ec869..8bf09c9eb 100644
--- a/src/Simulator/IncrementalRedstoneSimulator/TNTHandler.h
+++ b/src/Simulator/IncrementalRedstoneSimulator/TNTHandler.h
@@ -24,7 +24,7 @@ namespace TNTHandler
if (Power != 0)
{
a_Chunk.SetBlock(a_Position, E_BLOCK_AIR, 0);
- a_Chunk.GetWorld()->SpawnPrimedTNT(Vector3d(0.5, 0.5, 0.5) + cChunkDef::RelativeToAbsolute(a_Position, a_Chunk.GetPos())); // 80 ticks to boom
+ a_Chunk.GetWorld()->SpawnPrimedTNT(Vector3d(0.5, 0, 0.5) + cChunkDef::RelativeToAbsolute(a_Position, a_Chunk.GetPos())); // 80 ticks to boom
}
}