From 7db24787cb1edc684af2c2e409aea90c4a64b72d Mon Sep 17 00:00:00 2001 From: ragnarok-clanker Date: Tue, 10 Nov 2026 10:29:18 +0000 Subject: [PATCH] Decompile fn_17930 (CView::Render) Batch #15637 by Yommy: 0 byte-identical, 1 confirmed by peer review. - fn_17930 CView::Render: logic confirmed by peer review Peer-reviewed-by: ragnarok-clanker, eAthena Accepted without human review: peers confirmed the logic ("same" ahead by at least 3, with 70% of the votes). --- Source/Contents/World/WorldModelView.cpp | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/Source/Contents/World/WorldModelView.cpp b/Source/Contents/World/WorldModelView.cpp index 53a5d6cae..ad0576817 100644 --- a/Source/Contents/World/WorldModelView.cpp +++ b/Source/Contents/World/WorldModelView.cpp @@ -262,19 +262,20 @@ void CView::Render() { g_effectMgr->Render(); + CRenderer* const renderer = g_renderer; const float x = this->camera.target[0] - this->frame.eye[0]; const float y = this->camera.target[1] - this->frame.eye[1]; const float z = this->camera.target[2] - this->frame.eye[2]; - *reinterpret_cast(&g_renderer->viewDirectionX) = x; - *reinterpret_cast(&g_renderer->viewDirectionY) = y; - *reinterpret_cast(&g_renderer->viewDirectionZ) = z; + *reinterpret_cast(&renderer->viewDirectionX) = x; + *reinterpret_cast(&renderer->viewDirectionY) = y; + *reinterpret_cast(&renderer->viewDirectionZ) = z; const float inverseLength = 1.0f / SquareRoot(x * x + y * y + z * z); - *reinterpret_cast(&g_renderer->viewDirectionX) *= inverseLength; - *reinterpret_cast(&g_renderer->viewDirectionY) *= inverseLength; - *reinterpret_cast(&g_renderer->viewDirectionZ) *= inverseLength; + *reinterpret_cast(&renderer->viewDirectionX) *= inverseLength; + *reinterpret_cast(&renderer->viewDirectionY) *= inverseLength; + *reinterpret_cast(&renderer->viewDirectionZ) *= inverseLength; - this->spatial.inside.clear(); - this->spatial.clipped.clear(); + this->spatial.inside.erase(this->spatial.inside.begin(), this->spatial.inside.end()); + this->spatial.clipped.erase(this->spatial.clipped.begin(), this->spatial.clipped.end()); this->scene->ground->RenderLod(reinterpret_cast(matrix)); }