From 68b6b546f72b11c97e9bb8880060dc9646d6f8a4 Mon Sep 17 00:00:00 2001 From: UnknownShadow200 Date: Tue, 29 Mar 2016 16:40:14 +1100 Subject: [PATCH] Fix /gun being able to explode one block of bedrock. (Thanks goodlyay) --- Levels/Physics/TntPhysics.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Levels/Physics/TntPhysics.cs b/Levels/Physics/TntPhysics.cs index 1ad15cd83..bfe40504f 100644 --- a/Levels/Physics/TntPhysics.cs +++ b/Levels/Physics/TntPhysics.cs @@ -103,7 +103,9 @@ namespace MCGalaxy.BlockPhysics { bool force = false, TntWarsGame game = null) { Random rand = new Random(); if ((lvl.physics < 2 || lvl.physics == 5) && !force) return; - lvl.AddUpdate(lvl.PosToInt(x, y, z), Block.tntexplosion, true); + int index = lvl.PosToInt(x, y, z); + if (index >= 0 && !Block.OPBlocks(lvl.blocks[index])) + lvl.AddUpdate(index, Block.tntexplosion, true); Explode(lvl, x, y, z, size + 1, rand, -1, game); Explode(lvl, x, y, z, size + 2, rand, 7, game);