changed lightboxes so that (de)serialiser won't complain; world/actor json will will write game version it saved

This commit is contained in:
minjaesong
2022-02-25 11:42:22 +09:00
parent 428cdefb80
commit b2aece0176
10 changed files with 50 additions and 22 deletions

View File

@@ -358,7 +358,7 @@ object LightmapRenderer {
..lightBoxX.plus(lightBoxW).div(TILE_SIZE).floorInt()) {
val oldLight = lanternMap[LandUtil.getBlockAddr(world, x, y)] ?: Cvec(0) // if two or more luminous actors share the same block, mix the light
val actorLight = colour()
val actorLight = colour
lanternMap[LandUtil.getBlockAddr(world, x, y)] = oldLight.maxAndAssign(actorLight)
}
@@ -377,7 +377,7 @@ object LightmapRenderer {
..lightBoxX.plus(lightBoxW).div(TILE_SIZE).floorInt()) {
val oldLight = shadowMap[LandUtil.getBlockAddr(world, x, y)] ?: Cvec(0) // if two or more luminous actors share the same block, mix the light
val actorLight = colour()
val actorLight = colour
shadowMap[LandUtil.getBlockAddr(world, x, y)] = oldLight.maxAndAssign(actorLight)
}