From 7533983e8ad4e0881963cf53cc85c5b54d75168d Mon Sep 17 00:00:00 2001 From: ragnarok-clanker Date: Thu, 5 Nov 2026 04:23:20 +0000 Subject: [PATCH] Decompile 2 functions in Source/Contents/Models/ModelNode.cpp Batch #11688 by cremane: 0 byte-identical, 2 confirmed by peer review. - fn_17507 C3dNodeV1::Animate: logic confirmed by peer review - fn_17508 C3dNodeV2::Animate: logic confirmed by peer review Peer-reviewed-by: Yommy, KWDev Accepted without human review: peers confirmed the logic ("same" ahead by at least 3, with 70% of the votes). --- Source/Contents/Models/ModelNode.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/Source/Contents/Models/ModelNode.cpp b/Source/Contents/Models/ModelNode.cpp index 40a41045..b2176b84 100644 --- a/Source/Contents/Models/ModelNode.cpp +++ b/Source/Contents/Models/ModelNode.cpp @@ -123,7 +123,7 @@ void C3dNodeV2::Initialize(const ModelNode& base) { // OFFSET: 0x00AB9120 // FUNCTION: fn_17507 void C3dNodeV1::Animate(double frame) { - const int selected = TruncateToInt(frame); + const int selected = static_cast(frame); matrix position; matrix scale; matrix rotation; @@ -137,8 +137,8 @@ void C3dNodeV1::Animate(double frame) { combined.Compose(scale, rotation); this->transform.Compose(combined, position); - for (C3dNode* child : this->children) { - child->Animate(frame); + for (auto it = this->children.begin(); it != this->children.end(); ++it) { + (*it)->Animate(frame); } } @@ -152,11 +152,11 @@ void C3dNodeV2::Animate(double frame) { SampleModelPosition(this->positionKeys, selected, this->localTransform, this->transform); this->textureTransforms.clear(); - for (const auto& [texture, channels] : this->textureKeys) { - SampleModelTexture(channels, selected, this->textureTransforms[texture]); + for (auto it = this->textureKeys.begin(); it != this->textureKeys.end(); ++it) { + SampleModelTexture(it->second, selected, this->textureTransforms[it->first]); } - for (C3dNode* child : this->children) { - child->Animate(frame); + for (auto it = this->children.begin(); it != this->children.end(); ++it) { + (*it)->Animate(frame); } }