feat(ui): call CWorld::Update from CGWorldFrame::OnWorldUpdate
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-21 21:42:41 -06:00
parent 9b18f2f3bd
commit af4b798942
No known key found for this signature in database
GPG Key ID: 7628F8E61AEA070D

View File

@ -2,8 +2,10 @@
#include "gx/Coordinate.hpp"
#include "gx/Shader.hpp"
#include "gx/Transform.hpp"
#include "object/Client.hpp"
#include "ui/game/CGCamera.hpp"
#include "ui/game/PlayerName.hpp"
#include "world/World.hpp"
#include <storm/Memory.hpp>
#include <tempest/Matrix.hpp>
@ -92,7 +94,19 @@ void CGWorldFrame::OnWorldRender() {
void CGWorldFrame::OnWorldUpdate() {
// TODO
auto target = ClntObjMgrObjectPtr(this->m_camera->GetTarget(), TYPE_OBJECT, __FILE__, __LINE__);
// TODO
this->m_camera->SetupWorldProjection(this->m_screenRect);
// TODO
auto targetPos = target && !this->m_camera->HasModel()
? target->GetPosition()
: this->m_camera->Position();
CWorld::Update(this->m_camera->Position(), this->m_camera->Target(), targetPos);
// TODO
}