From aab5451ba2775597f1a5b0085382c70ceb14f3a5 Mon Sep 17 00:00:00 2001 From: Adspartan Date: Sun, 24 Nov 2024 20:42:42 +0100 Subject: [PATCH] noggit: liquid_layer: fix ocean liquid vertex format being wrong when saving ocean chunks not at 0 height --- src/noggit/liquid_layer.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/noggit/liquid_layer.cpp b/src/noggit/liquid_layer.cpp index 6abbb6d35..d22a1f7cc 100644 --- a/src/noggit/liquid_layer.cpp +++ b/src/noggit/liquid_layer.cpp @@ -408,7 +408,8 @@ void liquid_layer::changeLiquidID(int id) _liquid_vertex_format = 1; break; case 1: // ocean - _liquid_vertex_format = 2; + // lvf 2 is only used for flat water at height 0 + _liquid_vertex_format = misc::float_equals(_minimum, 0.f) && misc::float_equals(_maximum, 0.f) ? 2 : 0; _mclq_liquid_type = 1; break; default: // river