summaryrefslogtreecommitdiffstats
path: root/src/Physics/Explodinator.cpp
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/Physics/Explodinator.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/Physics/Explodinator.cpp b/src/Physics/Explodinator.cpp
index 72d050c59..7cd266c15 100644
--- a/src/Physics/Explodinator.cpp
+++ b/src/Physics/Explodinator.cpp
@@ -390,9 +390,9 @@ namespace Explodinator
// Trace rays from the explosion centre to all points in a square of area TraceCubeSideLength * TraceCubeSideLength
// for the top and bottom sides:
- for (int OffsetX = -HalfSide; OffsetX < HalfSide; OffsetX++)
+ for (float OffsetX = -HalfSide; OffsetX < HalfSide; OffsetX++)
{
- for (int OffsetZ = -HalfSide; OffsetZ < HalfSide; OffsetZ++)
+ for (float OffsetZ = -HalfSide; OffsetZ < HalfSide; OffsetZ++)
{
DestructionTrace(&a_Chunk, a_Position, Vector3f(OffsetX, +HalfSide, OffsetZ), a_Power, a_Fiery, RandomIntensity(Random, a_Power), a_ExplodingEntity);
DestructionTrace(&a_Chunk, a_Position, Vector3f(OffsetX, -HalfSide, OffsetZ), a_Power, a_Fiery, RandomIntensity(Random, a_Power), a_ExplodingEntity);
@@ -400,9 +400,9 @@ namespace Explodinator
}
// Left and right sides, avoid duplicates at top and bottom edges:
- for (int OffsetX = -HalfSide; OffsetX < HalfSide; OffsetX++)
+ for (float OffsetX = -HalfSide; OffsetX < HalfSide; OffsetX++)
{
- for (int OffsetY = -HalfSide + 1; OffsetY < HalfSide - 1; OffsetY++)
+ for (float OffsetY = -HalfSide + 1; OffsetY < HalfSide - 1; OffsetY++)
{
DestructionTrace(&a_Chunk, a_Position, Vector3f(OffsetX, OffsetY, +HalfSide), a_Power, a_Fiery, RandomIntensity(Random, a_Power), a_ExplodingEntity);
DestructionTrace(&a_Chunk, a_Position, Vector3f(OffsetX, OffsetY, -HalfSide), a_Power, a_Fiery, RandomIntensity(Random, a_Power), a_ExplodingEntity);
@@ -410,9 +410,9 @@ namespace Explodinator
}
// Front and back sides, avoid all edges:
- for (int OffsetZ = -HalfSide + 1; OffsetZ < HalfSide - 1; OffsetZ++)
+ for (float OffsetZ = -HalfSide + 1; OffsetZ < HalfSide - 1; OffsetZ++)
{
- for (int OffsetY = -HalfSide + 1; OffsetY < HalfSide - 1; OffsetY++)
+ for (float OffsetY = -HalfSide + 1; OffsetY < HalfSide - 1; OffsetY++)
{
DestructionTrace(&a_Chunk, a_Position, Vector3f(+HalfSide, OffsetY, OffsetZ), a_Power, a_Fiery, RandomIntensity(Random, a_Power), a_ExplodingEntity);
DestructionTrace(&a_Chunk, a_Position, Vector3f(-HalfSide, OffsetY, OffsetZ), a_Power, a_Fiery, RandomIntensity(Random, a_Power), a_ExplodingEntity);
@@ -425,7 +425,7 @@ namespace Explodinator
{
for (const auto Client : a_Chunk.GetAllClients())
{
- Client->SendExplosion(a_Position, a_Power);
+ Client->SendExplosion(a_Position, static_cast<float>(a_Power));
}
}