it darkens because you forgot the fucking assignment, same mistake from 2013

This commit is contained in:
minjaesong
2019-06-07 10:43:41 +09:00
parent 585a20542f
commit ae52de85a2

View File

@@ -425,9 +425,9 @@ object LightmapRenderer {
fluidAmountToCol = Cvec(thisFluid.amount) fluidAmountToCol = Cvec(thisFluid.amount)
thisTileLuminosity = BlockCodex[thisTerrain].luminosity thisTileLuminosity = BlockCodex[thisTerrain].luminosity
thisTileLuminosity.max(BlockCodex[thisFluid.type].luminosity * fluidAmountToCol) // already been div by four thisTileLuminosity = thisTileLuminosity.max(BlockCodex[thisFluid.type].luminosity * fluidAmountToCol) // already been div by four
thisTileOpacity = BlockCodex[thisTerrain].opacity thisTileOpacity = BlockCodex[thisTerrain].opacity
thisTileOpacity.max(BlockCodex[thisFluid.type].opacity * fluidAmountToCol) // already been div by four thisTileOpacity = thisTileOpacity.max(BlockCodex[thisFluid.type].opacity * fluidAmountToCol) // already been div by four
} }
else { else {
thisTileLuminosity = BlockCodex[thisTerrain].luminosity thisTileLuminosity = BlockCodex[thisTerrain].luminosity
@@ -444,7 +444,7 @@ object LightmapRenderer {
} }
// blend lantern // blend lantern
lightLevelThis.max(thisTileLuminosity).max(lanternMap[LandUtil.getBlockAddr(world, x, y)] ?: colourNull) lightLevelThis = lightLevelThis.max(thisTileLuminosity).max(lanternMap[LandUtil.getBlockAddr(world, x, y)] ?: colourNull)
} }
@@ -517,14 +517,14 @@ object LightmapRenderer {
// will "overwrite" what's there in the lightmap if it's the first pass // will "overwrite" what's there in the lightmap if it's the first pass
// takes about 2 ms on 6700K // takes about 2 ms on 6700K
/* + */lightLevelThis.max(darkenColoured(getLightInternal(x - 1, y - 1) ?: colourNull, thisTileOpacity2)) /* + */lightLevelThis = lightLevelThis.max(darkenColoured(getLightInternal(x - 1, y - 1) ?: colourNull, thisTileOpacity2))
/* + */lightLevelThis.max(darkenColoured(getLightInternal(x + 1, y - 1) ?: colourNull, thisTileOpacity2)) /* + */lightLevelThis = lightLevelThis.max(darkenColoured(getLightInternal(x + 1, y - 1) ?: colourNull, thisTileOpacity2))
/* + */lightLevelThis.max(darkenColoured(getLightInternal(x - 1, y + 1) ?: colourNull, thisTileOpacity2)) /* + */lightLevelThis = lightLevelThis.max(darkenColoured(getLightInternal(x - 1, y + 1) ?: colourNull, thisTileOpacity2))
/* + */lightLevelThis.max(darkenColoured(getLightInternal(x + 1, y + 1) ?: colourNull, thisTileOpacity2)) /* + */lightLevelThis = lightLevelThis.max(darkenColoured(getLightInternal(x + 1, y + 1) ?: colourNull, thisTileOpacity2))
/* * */lightLevelThis.max(darkenColoured(getLightInternal(x, y - 1) ?: colourNull, thisTileOpacity)) /* * */lightLevelThis = lightLevelThis.max(darkenColoured(getLightInternal(x, y - 1) ?: colourNull, thisTileOpacity))
/* * */lightLevelThis.max(darkenColoured(getLightInternal(x, y + 1) ?: colourNull, thisTileOpacity)) /* * */lightLevelThis = lightLevelThis.max(darkenColoured(getLightInternal(x, y + 1) ?: colourNull, thisTileOpacity))
/* * */lightLevelThis.max(darkenColoured(getLightInternal(x - 1, y) ?: colourNull, thisTileOpacity)) /* * */lightLevelThis = lightLevelThis.max(darkenColoured(getLightInternal(x - 1, y) ?: colourNull, thisTileOpacity))
/* * */lightLevelThis.max(darkenColoured(getLightInternal(x + 1, y) ?: colourNull, thisTileOpacity)) /* * */lightLevelThis = lightLevelThis.max(darkenColoured(getLightInternal(x + 1, y) ?: colourNull, thisTileOpacity))
//return lightLevelThis.cpy() // it HAS to be a cpy(), otherwise all cells gets the same instance //return lightLevelThis.cpy() // it HAS to be a cpy(), otherwise all cells gets the same instance