fix: some NaNs that can be caused by scroll bars

This commit is contained in:
minjaesong
2025-02-01 20:51:40 +09:00
parent a2006b0354
commit 69ebdbc542
13 changed files with 19 additions and 18 deletions

View File

@@ -891,7 +891,7 @@ open class GameWorld(
if (fluidID == Block.NULL || fluidID == Block.NOT_GENERATED)
fluidID = Fluid.NULL
return FluidInfo(fluidID, if (fill.isNaN()) 0f else fill) // hex FFFFFFFF (magic number for ungenerated tiles) is interpreted as Float.NaN
return FluidInfo(fluidID, fill.ifNaN(0f)) // hex FFFFFFFF (magic number for ungenerated tiles) is interpreted as Float.NaN
}
/*private fun fluidTypeToBlock(type: FluidType) = when (type.abs()) {