fix: remove dead code, name constants, add why-comments

- renderer: remove no-op assignment (mountAnims_.stand = 0 when already 0)
- renderer: add why-comments on blacksmith WMO ID 96048 (ambient forge
  sounds) with TODO for other smithy buildings
- terrain_renderer: replace 1e30f sentinel with numeric_limits::max(),
  name terrain view distance constant (1200 units ≈ 9 ADT tiles)
- social_handler: add missing LFG case 15, document case 0 nullptr
  return (success = no error message), add enum name comments
This commit is contained in:
Kelsi 2026-03-30 14:10:32 -07:00
parent 4acebff65c
commit 6dfac314ee
3 changed files with 15 additions and 7 deletions

View file

@ -727,7 +727,7 @@ void TerrainRenderer::render(VkCommandBuffer cmd, VkDescriptorSet perFrameSet, c
glm::vec3 cam = camera.getPosition();
// Find chunk nearest to camera
const TerrainChunkGPU* nearest = nullptr;
float nearestDist = 1e30f;
float nearestDist = std::numeric_limits<float>::max();
for (const auto& ch : chunks) {
float dx = ch.boundingSphereCenter.x - cam.x;
float dy = ch.boundingSphereCenter.y - cam.y;
@ -765,7 +765,10 @@ void TerrainRenderer::render(VkCommandBuffer cmd, VkDescriptorSet perFrameSet, c
}
glm::vec3 camPos = camera.getPosition();
const float maxTerrainDistSq = 1200.0f * 1200.0f;
// Terrain chunks beyond this distance are culled. 1200 world units ≈ 9 ADT tiles,
// matching the asset loading radius (8 tiles) plus a buffer for pop-in avoidance.
constexpr float kMaxTerrainViewDist = 1200.0f;
const float maxTerrainDistSq = kMaxTerrainViewDist * kMaxTerrainViewDist;
renderedChunks = 0;
culledChunks = 0;