From ede3ac5db4670bbffca1c02a9a1116918c2b6222 Mon Sep 17 00:00:00 2001 From: Daniel Grimwood Date: Thu, 13 Feb 2020 19:58:02 +0800 Subject: [PATCH] And the other location for the temporary variables --- overviewer_core/src/primitives/cave.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/overviewer_core/src/primitives/cave.c b/overviewer_core/src/primitives/cave.c index 3b06467..66d976e 100644 --- a/overviewer_core/src/primitives/cave.c +++ b/overviewer_core/src/primitives/cave.c @@ -89,7 +89,8 @@ cave_hidden(void* data, RenderState* state, int32_t x, int32_t y, int32_t z) { if (get_data(state, SKYLIGHT, x, dy, z) != 0) { return true; } - if (get_data(state, BLOCKS, x, dy, z) != 8 && get_data(state, BLOCKS, x, dy, z) != 9) { + blockUpID = get_data(state, BLOCKS, x, dy, z); + if (blockUpID != 8 && blockUpID != 9) { /* we are out of the water! and there's no skylight * , i.e. is a cave lake or something similar */ break;