mirror of
https://gitlab.bixilon.de/bixilon/minosoft.git
synced 2025-09-11 08:27:29 -04:00
fog: fix color not clearing anymore
When you went in water the blue color never cleared
This commit is contained in:
parent
8e80d91494
commit
a998fcd989
@ -76,9 +76,9 @@ class FogManager(
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
save()
|
|
||||||
this.options = options
|
this.options = options
|
||||||
state.revision++
|
state.revision++
|
||||||
|
save()
|
||||||
context.camera.matrix.invalidate()
|
context.camera.matrix.invalidate()
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -98,7 +98,7 @@ class FogManager(
|
|||||||
state.end = interpolateLinear(progress, interpolation.end, options?.end ?: 0.0f)
|
state.end = interpolateLinear(progress, interpolation.end, options?.end ?: 0.0f)
|
||||||
|
|
||||||
val sourceColor = interpolation.color ?: options?.color ?: Colors.TRANSPARENT
|
val sourceColor = interpolation.color ?: options?.color ?: Colors.TRANSPARENT
|
||||||
val targetColor = options?.color ?: RGBColor(sourceColor.red, sourceColor.green, sourceColor.blue, 0x00)
|
val targetColor = options?.color ?: Colors.TRANSPARENT
|
||||||
var color: RGBColor? = interpolateSine(progress, sourceColor, targetColor)
|
var color: RGBColor? = interpolateSine(progress, sourceColor, targetColor)
|
||||||
if (color == Colors.TRANSPARENT) {
|
if (color == Colors.TRANSPARENT) {
|
||||||
color = null
|
color = null
|
||||||
|
Loading…
x
Reference in New Issue
Block a user