From 06e8a8995555d8e2406898ce437a61f96d571e35 Mon Sep 17 00:00:00 2001 From: ragnarok-clanker Date: Fri, 6 Nov 2026 14:32:26 +0000 Subject: [PATCH] Decompile fn_17494 (C3dActorV2::Update) Batch #13366 by SapitoSucio: 1 byte-identical, 0 confirmed by peer review. - fn_17494 C3dActorV2::Update: byte-identical Merged automatically: every function is byte-identical to the original. --- Source/Contents/Models/ModelPlayback.cpp | 34 +++++++++++++----------- 1 file changed, 19 insertions(+), 15 deletions(-) diff --git a/Source/Contents/Models/ModelPlayback.cpp b/Source/Contents/Models/ModelPlayback.cpp index e69b8029..f89a906a 100644 --- a/Source/Contents/Models/ModelPlayback.cpp +++ b/Source/Contents/Models/ModelPlayback.cpp @@ -54,21 +54,25 @@ void C3dActorV1::Update() { // OFFSET: 0x00AB7A10 // FUNCTION: fn_17494 void C3dActorV2::Update() { - if (this->playback != 1 && this->playback != 2) { - return; - } - - const unsigned tick = GetTickCount(); - unsigned frame = static_cast(static_cast(tick - this->startTick) * this->speed); - - if (static_cast(frame) >= this->duration) { - if (this->playback == 1) { - frame = static_cast(this->duration - 1.0); - } else { - this->startTick = tick; - frame = 0; + switch (this->playback) { + case 1: { + const unsigned tick = GetTickCount(); + unsigned frame = static_cast(static_cast(tick - this->startTick) * this->speed); + if (static_cast(frame) >= this->duration) { + frame = static_cast(this->duration - 1.0); + } + this->Animate(static_cast(frame)); + break; + } + case 2: { + const unsigned tick = GetTickCount(); + unsigned frame = static_cast(static_cast(tick - this->startTick) * this->speed); + if (static_cast(frame) >= this->duration) { + this->startTick = tick; + frame = 0; + } + this->Animate(static_cast(frame)); + break; } } - - this->Animate(static_cast(frame)); }