From: Elias Fleckenstein Date: Fri, 25 Jun 2021 21:23:33 +0000 (+0200) Subject: Fix z-index of crack when digging a node with a z-index below the player's X-Git-Url: https://git.lizzy.rs/?a=commitdiff_plain;h=d50f0e8d71a9801a4d7481a31384b16c5e0771d3;p=dragonblocks.git Fix z-index of crack when digging a node with a z-index below the player's --- diff --git a/engine/map_interaction.js b/engine/map_interaction.js index 3201da1..9ad23de 100644 --- a/engine/map_interaction.js +++ b/engine/map_interaction.js @@ -124,6 +124,7 @@ dragonblocks.MapInteraction = { let crack = document.getElementById("dragonblocks.crack[" + this.id + "]"); crack.style.background = dragonblocks.getTexture("crack" + Math.floor(node.meta.causedDamage / nodeDef.hardness * 5) + ".png"); crack.style.backgroundSize = "cover"; + crack.style.zIndex = nodeDef.zIndex || "1"; this.tmp.digTimeout = setTimeout(_ => { self.digTick(x, y);