summaryrefslogtreecommitdiff
path: root/src/engine/objects/Mole.cpp
diff options
context:
space:
mode:
authorMegaMech <MegaMech@users.noreply.github.com>2025-11-22 18:13:33 -0700
committerGitHub <noreply@github.com>2025-11-22 18:13:33 -0700
commit5f60e30b59497d54b23097f8dbe5009faa43504d (patch)
tree3ddd0e64f452843e67774b040a207de84dca852d /src/engine/objects/Mole.cpp
parentfffd3f7fe92c6eb45b68c0ca522066bf9c54abb2 (diff)
Fix Moles and some UI Interpolation bugs (#565)
* Update render_objects.c * Update FrameInterpolation.h * Update render_objects.c * Fix mac compile probably * Fix Mole Dirt Particles * Fix Mole Duplication Bug, probably * Fix drawing using wrong camera bug
Diffstat (limited to 'src/engine/objects/Mole.cpp')
-rw-r--r--src/engine/objects/Mole.cpp17
1 files changed, 7 insertions, 10 deletions
diff --git a/src/engine/objects/Mole.cpp b/src/engine/objects/Mole.cpp
index 9ee4db7e7..9bc470f90 100644
--- a/src/engine/objects/Mole.cpp
+++ b/src/engine/objects/Mole.cpp
@@ -51,15 +51,12 @@ OMole::OMole(FVector pos, OMoleGroup* group) {
_count++;
}
+/**
+ * Moles are ticked from OMoleGroup
+ * OMoleTick is func_800821AC
+ * Dirt particle tick is func_80081790
+ */
void OMole::Tick() {
- if (_idx == 0) {
- for (size_t i = 0; i < gObjectParticle2_SIZE; i++) {
- s32 objectIndex = gObjectParticle2[i];
- if (gObjectList[objectIndex].state != 0) {
- OMole::func_80081790(objectIndex);
- }
- }
- }
}
void OMole::Draw(s32 cameraId) {
@@ -184,9 +181,9 @@ void OMole::func_8008153C(s32 objectIndex) {
gObjectList[loopObjectIndex].activeTLUT = d_course_moo_moo_farm_mole_dirt;
gObjectList[loopObjectIndex].tlutList = mole;
gObjectList[loopObjectIndex].sizeScaling = 0.15f;
- gObjectList[loopObjectIndex].velocity[1] = random_int(0x000AU);
+ gObjectList[loopObjectIndex].velocity[1] = random_int(10);
gObjectList[loopObjectIndex].velocity[1] = (gObjectList[loopObjectIndex].velocity[1] * 0.1) + 4.8;
- gObjectList[loopObjectIndex].unk_034 = random_int(5U);
+ gObjectList[loopObjectIndex].unk_034 = random_int(5);
gObjectList[loopObjectIndex].unk_034 = (gObjectList[loopObjectIndex].unk_034 * 0.01) + 0.8;
gObjectList[loopObjectIndex].orientation[1] = (0x10000 / sp70) * var_s1;
gObjectList[loopObjectIndex].origin_pos[0] = gObjectList[objectIndex].origin_pos[0];