summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/ClientHandle.cpp4
-rw-r--r--src/Mobs/PathFinder.cpp2
-rw-r--r--src/Simulator/FluidSimulator.cpp14
-rw-r--r--src/World.cpp22
4 files changed, 23 insertions, 19 deletions
diff --git a/src/ClientHandle.cpp b/src/ClientHandle.cpp
index 15118dd2d..db54cc77b 100644
--- a/src/ClientHandle.cpp
+++ b/src/ClientHandle.cpp
@@ -2683,13 +2683,13 @@ void cClientHandle::SendExplosion(const Vector3f a_Position, const float a_Power
auto ParticleCount = std::min(static_cast<int>(ParticleFormula * 125), 600);
// Dark smoke particles:
- SendParticleEffect("largesmoke", a_Position, {0.f, 0.f, 0.f,}, Spread, static_cast<int>(ParticleCount));
+ SendParticleEffect("largesmoke", a_Position, {0.f, 0.f, 0.f}, Spread, static_cast<int>(ParticleCount));
Spread = ParticleFormula * 0.35f;
ParticleCount = std::min(static_cast<int>(ParticleFormula * 550), 1800);
// Light smoke particles:
- SendParticleEffect("explode", a_Position, {0.f, 0.f, 0.f,}, Spread, static_cast<int>(ParticleCount));
+ SendParticleEffect("explode", a_Position, {0.f, 0.f, 0.f}, Spread, static_cast<int>(ParticleCount));
// Shockwave effect:
m_Protocol->SendExplosion(a_Position, a_Power);
diff --git a/src/Mobs/PathFinder.cpp b/src/Mobs/PathFinder.cpp
index 260044f3b..2e832918a 100644
--- a/src/Mobs/PathFinder.cpp
+++ b/src/Mobs/PathFinder.cpp
@@ -236,7 +236,7 @@ bool cPathFinder::EnsureProperPoint(Vector3d & a_Vector, cChunk & a_Chunk)
// Go down to the lowest air block.
if (InTheAir)
{
- while (cChunkDef::IsValidHeight(a_Vector.addedY(-1)))
+ while (cChunkDef::IsValidHeight(BelowRel.addedY(-1)))
{
Chunk->GetBlockTypeMeta(BelowRel.addedY(-1), BlockType, BlockMeta);
if (IsWaterOrSolid(BlockType))
diff --git a/src/Simulator/FluidSimulator.cpp b/src/Simulator/FluidSimulator.cpp
index 968b8bd6e..3771b0804 100644
--- a/src/Simulator/FluidSimulator.cpp
+++ b/src/Simulator/FluidSimulator.cpp
@@ -153,13 +153,15 @@ Vector3f cFluidSimulator::GetFlowingDirection(Vector3i a_Pos)
NIBBLETYPE LevelPoint[4];
// blocks around the checking pos
- std::array<Vector3i, 4> Offsets {
+ std::array<Vector3i, 4> Offsets
{
- { 1, 0, 0 },
- { 0, 0, 1 },
- { 1, 0, 0 },
- { 0, 0, 1 }
- }};
+ {
+ { 1, 0, 0 },
+ { 0, 0, 1 },
+ { 1, 0, 0 },
+ { 0, 0, 1 }
+ }
+ };
for (size_t i = 0; i < Offsets.size(); i++)
{
diff --git a/src/World.cpp b/src/World.cpp
index 77230e5b8..65908ed9d 100644
--- a/src/World.cpp
+++ b/src/World.cpp
@@ -860,16 +860,18 @@ bool cWorld::CheckPlayerSpawnPoint(Vector3i a_Pos)
// Check that surrounding blocks are neither solid or liquid
constexpr std::array<Vector3i, 8> SurroundingCoords =
- {{
- {0, 0, 1},
- {1, 0, 1},
- {1, 0, 0},
- {1, 0, -1},
- {0, 0, -1},
- {-1, 0, -1},
- {-1, 0, 0},
- {-1, 0, 1},
- }};
+ {
+ {
+ {0, 0, 1},
+ {1, 0, 1},
+ {1, 0, 0},
+ {1, 0, -1},
+ {0, 0, -1},
+ {-1, 0, -1},
+ {-1, 0, 0},
+ {-1, 0, 1},
+ }
+ };
for (const auto & Offset : SurroundingCoords)
{