From f8f00b599e93938d0d051ab93208b9f5fc7faf79 Mon Sep 17 00:00:00 2001 From: fallenoak Date: Tue, 17 Feb 2026 21:46:18 -0600 Subject: [PATCH] feat(world): set near clip and far clip in CWorld::LoadMap --- src/world/CWorld.cpp | 8 ++++++-- src/world/CWorld.hpp | 2 +- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/world/CWorld.cpp b/src/world/CWorld.cpp index bb8726a..8a14a42 100644 --- a/src/world/CWorld.cpp +++ b/src/world/CWorld.cpp @@ -164,10 +164,14 @@ void CWorld::Initialize() { // TODO } -void CWorld::LoadMap(const char* mapName, const C3Vector& position, int32_t zoneID) { +void CWorld::LoadMap(const char* mapName, const C3Vector& position, int32_t mapID) { + CWorld::s_farClip = AdjustFarClip(CWorldParam::cvar_farClip->GetFloat(), mapID); + CWorld::s_nearClip = 0.2f; + CWorld::s_prevFarClip = CWorld::s_farClip; + // TODO - CMap::Load(mapName, zoneID); + CMap::Load(mapName, mapID); // TODO } diff --git a/src/world/CWorld.hpp b/src/world/CWorld.hpp index 94a3cdd..124e370 100644 --- a/src/world/CWorld.hpp +++ b/src/world/CWorld.hpp @@ -66,7 +66,7 @@ class CWorld { static uint32_t GetTickTimeMs(); static float GetTickTimeSec(); static void Initialize(); - static void LoadMap(const char* mapName, const C3Vector& position, int32_t zoneID); + static void LoadMap(const char* mapName, const C3Vector& position, int32_t mapID); static int32_t OnTick(const EVENT_DATA_TICK* data, void* param); static void SetFarClip(float farClip); static void SetUpdateTime(float tickTimeSec, uint32_t curTimeMs);