mirror of
https://github.com/ClassiCube/ClassiCube.git
synced 2025-09-16 11:06:06 -04:00
Fix fog incorrectly still applying with a non-full size block, even though camera wasn't actually inside the block (thanks Goodly)
This commit is contained in:
parent
4342482610
commit
cf5671394a
@ -54,7 +54,7 @@ static void EnvRenderer_CalcFog(float* density, PackedCol* col) {
|
||||
Vec3_Add(&blockBB.Min, &pos, &Blocks.MinBB[block]);
|
||||
Vec3_Add(&blockBB.Max, &pos, &Blocks.MaxBB[block]);
|
||||
|
||||
if (AABB_ContainsPoint(&blockBB, &pos) && Blocks.FogDensity[block] != 0.0f) {
|
||||
if (AABB_ContainsPoint(&blockBB, &Camera.CurrentPos) && Blocks.FogDensity[block]) {
|
||||
*density = Blocks.FogDensity[block];
|
||||
*col = Blocks.FogCol[block];
|
||||
} else {
|
||||
|
Loading…
x
Reference in New Issue
Block a user