Skip to content

Commit

Permalink
Avoid first-run log spam
Browse files Browse the repository at this point in the history
  • Loading branch information
past-due committed Nov 18, 2023
1 parent 3c78263 commit 819da14
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/terrain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 819da14

Please sign in to comment.