From b5ff136ea5389d38d2a7faff083fe7ca1b56ed04 Mon Sep 17 00:00:00 2001 From: azurine-ph Date: Fri, 20 Mar 2026 12:00:47 -0600 Subject: [PATCH] Match `ActorRupee: : vfunc_18` (#35) * Match ActorRupee: : vfunc_18 * restore +x permissions * fix build issues --------- Co-authored-by: Yanis002 <35189056+Yanis002@users.noreply.github.com> --- src/031_Land/Actor/ActorRupee.cpp | 42 ++++++++++++++++++++----------- 1 file changed, 28 insertions(+), 14 deletions(-) diff --git a/src/031_Land/Actor/ActorRupee.cpp b/src/031_Land/Actor/ActorRupee.cpp index cde402d5..d61203fc 100644 --- a/src/031_Land/Actor/ActorRupee.cpp +++ b/src/031_Land/Actor/ActorRupee.cpp @@ -100,42 +100,56 @@ ARM bool ActorRupee::vfunc_18(unk32 param1) { case 0: this->mUnk_96 = 0x1E0; this->mUnk_94 = 0; - this->mVel.x = 0; - this->mVel.y = 0; - this->mVel.z = 0; + { + Vec3p vel; + vel.x = 0; + vel.y = 0; + vel.z = 0; + this->mVel = vel; + } this->func_ov031_020e9904(0); break; + case 1: this->mUnk_96 = 0x1E0; this->mUnk_94 = 0; - { Vec3p vel; - vel.x = gRandom.Next32(0, 0x223); - vel.y = gRandom.Next32(0, 0x333); - vel.z = gRandom.Next32(0, 0x223); + q20 vx = gRandom.Next32(0, 0x223) - 0x111; + vel.x = vx; - this->mVel.x = vel.x - 0x111; - this->mVel.y = vel.y + 0x555; - this->mVel.z = vel.z - 0x111; + q20 vy = gRandom.Next32(0, 0x333) + 0x555; + vel.y = vy; + + q20 vz = gRandom.Next32(0, 0x223) - 0x111; + vel.z = vz; + + this->mVel = vel; } - this->func_ov031_020e9904(0); break; + case 2: this->mUnk_96 = 0x1E0; this->mUnk_94 = 0; - this->mVel.x = 0; - this->mVel.y = 0x800; - this->mVel.z = 0; + { + Vec3p vel; + vel.x = 0; + vel.y = 0x800; + vel.z = 0; + this->mVel = vel; + } this->func_ov031_020e9904(0); break; + case 3: break; + case 4: this->func_ov031_020e9904(10); break; + default: break; }