From 250b8eb652a57dcbdff4af7b6efb9c2554b45798 Mon Sep 17 00:00:00 2001 From: x12xx12x <44411062+12xx12@users.noreply.github.com> Date: Fri, 26 Nov 2021 00:51:47 +0100 Subject: Fixed Compiler Warnings --- src/Physics/Explodinator.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src/Physics') 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(a_Power)); } } -- cgit v1.2.3