From 087b7e7abfe81dd7f0fdcdea36ac9f245950df1a Mon Sep 17 00:00:00 2001 From: Loki Rautio Date: Sat, 7 Mar 2026 21:12:22 -0600 Subject: Revert "Project modernization (#630)" This code was not tested and breaks in Release builds, reverting to restore functionality of the nightly. All in-game menus do not work and generating a world crashes. This reverts commit a9be52c41a02d207233199e98898fe7483d7e817. --- Minecraft.Client/ParticleEngine.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'Minecraft.Client/ParticleEngine.cpp') diff --git a/Minecraft.Client/ParticleEngine.cpp b/Minecraft.Client/ParticleEngine.cpp index efc09c9a..7fe26063 100644 --- a/Minecraft.Client/ParticleEngine.cpp +++ b/Minecraft.Client/ParticleEngine.cpp @@ -17,7 +17,7 @@ ResourceLocation ParticleEngine::PARTICLES_LOCATION = ResourceLocation(TN_PARTIC ParticleEngine::ParticleEngine(Level *level, Textures *textures) { -// if (level != nullptr) // 4J - removed - we want level to be initialised to *something* +// if (level != NULL) // 4J - removed - we want level to be initialised to *something* { this->level = level; } @@ -188,8 +188,8 @@ void ParticleEngine::renderLit(shared_ptr player, float a, int list) void ParticleEngine::setLevel(Level *level) { this->level = level; - // 4J - we've now got a set of particle vectors for each dimension, and only clearing them when its game over & the level is set to nullptr - if( level == nullptr ) + // 4J - we've now got a set of particle vectors for each dimension, and only clearing them when its game over & the level is set to NULL + if( level == NULL ) { for( int l = 0; l < 3; l++ ) { @@ -218,7 +218,7 @@ void ParticleEngine::destroy(int x, int y, int z, int tid, int data) double yp = y + (yy + 0.5) / SD; double zp = z + (zz + 0.5) / SD; int face = random->nextInt(6); - add((std::make_shared(level, xp, yp, zp, xp - x - 0.5f, yp - y - 0.5f, zp - z - 0.5f, tile, face, data, textures))->init(x, y, z, data)); + add(( shared_ptr(new TerrainParticle(level, xp, yp, zp, xp - x - 0.5f, yp - y - 0.5f, zp - z - 0.5f, tile, face, data, textures) ) )->init(x, y, z, data)); } } @@ -237,7 +237,7 @@ void ParticleEngine::crack(int x, int y, int z, int face) if (face == 3) zp = z + tile->getShapeZ1() + r; if (face == 4) xp = x + tile->getShapeX0() - r; if (face == 5) xp = x + tile->getShapeX1() + r; - add((std::make_shared(level, xp, yp, zp, 0, 0, 0, tile, face, level->getData(x, y, z), textures))->init(x, y, z, level->getData(x, y, z))->setPower(0.2f)->scale(0.6f)); + add(( shared_ptr(new TerrainParticle(level, xp, yp, zp, 0, 0, 0, tile, face, level->getData(x, y, z), textures) ) )->init(x, y, z, level->getData(x, y, z))->setPower(0.2f)->scale(0.6f)); } -- cgit v1.2.3