Skip to content

Commit b5ff136

Browse files
azurine-phYanis002
andauthored
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>
1 parent 804b25c commit b5ff136

File tree

1 file changed

+28
-14
lines changed

1 file changed

+28
-14
lines changed

src/031_Land/Actor/ActorRupee.cpp

Lines changed: 28 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -100,42 +100,56 @@ ARM bool ActorRupee::vfunc_18(unk32 param1) {
100100
case 0:
101101
this->mUnk_96 = 0x1E0;
102102
this->mUnk_94 = 0;
103-
this->mVel.x = 0;
104-
this->mVel.y = 0;
105-
this->mVel.z = 0;
103+
{
104+
Vec3p vel;
105+
vel.x = 0;
106+
vel.y = 0;
107+
vel.z = 0;
108+
this->mVel = vel;
109+
}
106110
this->func_ov031_020e9904(0);
107111
break;
112+
108113
case 1:
109114
this->mUnk_96 = 0x1E0;
110115
this->mUnk_94 = 0;
111-
112116
{
113117
Vec3p vel;
114118

115-
vel.x = gRandom.Next32(0, 0x223);
116-
vel.y = gRandom.Next32(0, 0x333);
117-
vel.z = gRandom.Next32(0, 0x223);
119+
q20 vx = gRandom.Next32(0, 0x223) - 0x111;
120+
vel.x = vx;
118121

119-
this->mVel.x = vel.x - 0x111;
120-
this->mVel.y = vel.y + 0x555;
121-
this->mVel.z = vel.z - 0x111;
122-
}
122+
q20 vy = gRandom.Next32(0, 0x333) + 0x555;
123+
vel.y = vy;
123124

125+
q20 vz = gRandom.Next32(0, 0x223) - 0x111;
126+
vel.z = vz;
127+
128+
this->mVel = vel;
129+
}
124130
this->func_ov031_020e9904(0);
125131
break;
132+
126133
case 2:
127134
this->mUnk_96 = 0x1E0;
128135
this->mUnk_94 = 0;
129-
this->mVel.x = 0;
130-
this->mVel.y = 0x800;
131-
this->mVel.z = 0;
136+
{
137+
Vec3p vel;
138+
vel.x = 0;
139+
vel.y = 0x800;
140+
vel.z = 0;
141+
this->mVel = vel;
142+
}
132143
this->func_ov031_020e9904(0);
133144
break;
145+
134146
case 3:
135147
break;
148+
136149
case 4:
137150
this->func_ov031_020e9904(10);
138151
break;
152+
139153
default:
140154
break;
141155
}

0 commit comments

Comments
 (0)