feat(world): set near clip and far clip in CWorld::LoadMap
Some checks are pending
Push / ${{ matrix.build.system_name }} / ${{ matrix.build.build_type }} / ${{ matrix.build.compiler_name }} (map[build_type:Release cc:cl compiler_name:MSVC cxx:cl os:windows-latest system_name:Windows test_path:WhoaTest]) (push) Waiting to run
Push / ${{ matrix.build.system_name }} / ${{ matrix.build.build_type }} / ${{ matrix.build.compiler_name }} (map[build_type:Release cc:clang compiler_name:Clang cxx:clang++ os:macos-latest system_name:macOS test_path:WhoaTest]) (push) Waiting to run
Push / ${{ matrix.build.system_name }} / ${{ matrix.build.build_type }} / ${{ matrix.build.compiler_name }} (map[build_type:Release cc:gcc compiler_name:GCC cxx:g++ os:ubuntu-latest system_name:Linux test_path:WhoaTest]) (push) Waiting to run

This commit is contained in:
fallenoak 2026-02-17 21:46:18 -06:00
parent 703dc26df7
commit f8f00b599e
No known key found for this signature in database
GPG Key ID: 7628F8E61AEA070D
2 changed files with 7 additions and 3 deletions

View File

@ -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
}

View File

@ -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);