mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2026-04-09 17:26:58 +00:00
fix: add width/height/scaleFactor guards in SpawnScenePoints to prevent division by zero
Agent-Logs-Url: https://github.com/DarkflameUniverse/DarkflameServer/sessions/386caefa-6a0f-4445-b3a5-3534ca2a5a93 Co-authored-by: aronwk-aaron <26027722+aronwk-aaron@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
f66716f027
commit
d5bacabbdc
@@ -1962,7 +1962,8 @@ namespace DEVGMCommands {
|
||||
uint32_t spawnedCount = 0;
|
||||
|
||||
for (const auto& chunk : raw.chunks) {
|
||||
if (chunk.sceneMap.empty() || chunk.colorMapResolution == 0 || chunk.heightMap.empty()) continue;
|
||||
if (chunk.sceneMap.empty() || chunk.colorMapResolution == 0 || chunk.heightMap.empty()
|
||||
|| chunk.width <= 1 || chunk.height <= 1 || chunk.scaleFactor <= 0.0f) continue;
|
||||
|
||||
// Iterate through the heightmap (same as GenerateTerrainMesh)
|
||||
for (uint32_t i = 0; i < chunk.width; ++i) {
|
||||
|
||||
Reference in New Issue
Block a user