From 819da143d5d810def72bfaec2a7b83571d6ab2a6 Mon Sep 17 00:00:00 2001 From: past-due <30942300+past-due@users.noreply.github.com> Date: Fri, 17 Nov 2023 19:27:50 -0500 Subject: [PATCH] Avoid first-run log spam --- src/terrain.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/terrain.cpp b/src/terrain.cpp index e0285b9a900..aa041434e26 100644 --- a/src/terrain.cpp +++ b/src/terrain.cpp @@ -813,7 +813,10 @@ bool setTerrainMappingTexturesMaxSize(int texSize) bool isPowerOfTwo = !(texSize == 0) && !(texSize & (texSize - 1)); if (!isPowerOfTwo || texSize < MIN_TERRAIN_TEXTURE_SIZE || texSize > 1024) { - debug(LOG_ERROR, "Attempted to set bad terrain mapping texture max size %d! Ignored.", texSize); + if (texSize != 0) + { + debug(LOG_ERROR, "Attempted to set bad terrain mapping texture max size %d! Ignored.", texSize); + } return false; } maxTerrainMappingTextureSize = texSize;