From ee4318c2f8c0b65a13a94e800ed95661d8aee6b6 Mon Sep 17 00:00:00 2001 From: iProgramInCpp Date: Sun, 7 Apr 2024 08:03:43 +0300 Subject: [PATCH] * Fix a small bug, add smoke particles on burnout --- source/world/tile/RedStoneTorchTile.cpp | 8 +++++++- source/world/tile/WireTile.cpp | 2 +- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/source/world/tile/RedStoneTorchTile.cpp b/source/world/tile/RedStoneTorchTile.cpp index 16a7cd9b..6ce22d01 100644 --- a/source/world/tile/RedStoneTorchTile.cpp +++ b/source/world/tile/RedStoneTorchTile.cpp @@ -80,7 +80,13 @@ void RedStoneTorchTile::tick(Level* level, int x, int y, int z, Random* random) if (checkBurnOut(level, x, y, z, true)) { - // TODO - Particle related + level->addParticle( + "smoke", + float(x) + random->nextFloat() * 0.6f + 0.2f, + float(y) + random->nextFloat() * 0.6f + 0.2f, + float(z) + random->nextFloat() * 0.6f + 0.2f, + 0.0f, 0.0f, 0.0f + ); } } } diff --git a/source/world/tile/WireTile.cpp b/source/world/tile/WireTile.cpp index 90f5bbd2..8146df4b 100644 --- a/source/world/tile/WireTile.cpp +++ b/source/world/tile/WireTile.cpp @@ -74,7 +74,7 @@ int WireTile::getConnections(LevelSource* level, int x, int y, int z) } // check below: - if (level->isSolidTile(x + checkXD[i], y, z + checkXD[i])) + if (level->isSolidTile(x + checkXD[i], y, z + checkZD[i])) continue; if (level->getTile(x + checkXD[i], y - 1, z + checkZD[i]) == m_ID)