mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-03-07 12:21:52 +09:00
hopelessly fixing wall flicker when taking down
This commit is contained in:
@@ -274,6 +274,10 @@ internal object BlocksDrawer {
|
||||
return k
|
||||
}
|
||||
|
||||
private val occlusionRenderTag = CreateTileAtlas.RenderTag(
|
||||
OCCLUSION_TILE_NUM_BASE, CreateTileAtlas.RenderTag.CONNECT_SELF, CreateTileAtlas.RenderTag.MASK_47
|
||||
)
|
||||
|
||||
/**
|
||||
* Autotiling; writes to buffer. Actual draw code must be called after this operation.
|
||||
*
|
||||
@@ -338,11 +342,9 @@ internal object BlocksDrawer {
|
||||
0
|
||||
}
|
||||
|
||||
val renderTag = App.tileMaker.getRenderTag(thisTile)
|
||||
val renderTag = if (mode == OCCLUSION) occlusionRenderTag else App.tileMaker.getRenderTag(thisTile)
|
||||
val tileNumberBase =
|
||||
if (mode == OCCLUSION)
|
||||
OCCLUSION_TILE_NUM_BASE
|
||||
else if (mode == FLUID)
|
||||
if (mode == FLUID)
|
||||
App.tileMaker.fluidToTileNumber(world.getFluid(x, y))
|
||||
else
|
||||
renderTag.tileNumber
|
||||
@@ -354,9 +356,6 @@ internal object BlocksDrawer {
|
||||
// special case: fluids
|
||||
else if (mode == FLUID)
|
||||
tileNumberBase + connectLut47[nearbyTilesInfo]
|
||||
// special case: occlusion
|
||||
else if (mode == OCCLUSION)
|
||||
tileNumberBase + connectLut47[nearbyTilesInfo]
|
||||
// rest of the cases: terrain and walls
|
||||
else tileNumberBase + when (renderTag.maskType) {
|
||||
CreateTileAtlas.RenderTag.MASK_NA -> 0
|
||||
|
||||
Reference in New Issue
Block a user