summaryrefslogtreecommitdiff
path: root/src/engine/objects
diff options
context:
space:
mode:
authorMegaMech <MegaMech@users.noreply.github.com>2025-11-23 13:18:51 -0700
committerGitHub <noreply@github.com>2025-11-23 13:18:51 -0700
commit96f02bd70f4f24ab3fa28d479ee0c7ff84928e33 (patch)
tree34d795856b2e2309271024fb770be9831ebd6fbd /src/engine/objects
parent52554e21cc0b515c95cf8108ff6255703f5465e3 (diff)
Only Spawn Three ChainChomps for Rainbow Track (#569)
* Update RainbowRoad.cpp * Update ChainChomp.cpp * Decrement actor counters in destructor * Update Finishline.cpp
Diffstat (limited to 'src/engine/objects')
-rw-r--r--src/engine/objects/ChainChomp.cpp4
-rw-r--r--src/engine/objects/Crab.h3
-rw-r--r--src/engine/objects/Mole.h3
-rw-r--r--src/engine/objects/MoleGroup.h3
4 files changed, 11 insertions, 2 deletions
diff --git a/src/engine/objects/ChainChomp.cpp b/src/engine/objects/ChainChomp.cpp
index fd3faa622..9f750831b 100644
--- a/src/engine/objects/ChainChomp.cpp
+++ b/src/engine/objects/ChainChomp.cpp
@@ -20,8 +20,8 @@ OChainChomp::OChainChomp() {
Name = "Chain Chomp";
ResourceName = "mk:chain_chomp";
_idx = _count;
- init_object(indexObjectList2[_count], 0);
- _objectIndex = indexObjectList2[_count];
+ init_object(indexObjectList2[_idx], 0);
+ _objectIndex = indexObjectList2[_idx];
_count++;
}
diff --git a/src/engine/objects/Crab.h b/src/engine/objects/Crab.h
index d2c694ff1..08056f114 100644
--- a/src/engine/objects/Crab.h
+++ b/src/engine/objects/Crab.h
@@ -41,6 +41,9 @@ public:
}
explicit OCrab(const SpawnParams& params);
+ ~OCrab() {
+ _count--;
+ }
virtual void Tick() override;
virtual void Draw(s32 cameraId) override;
diff --git a/src/engine/objects/Mole.h b/src/engine/objects/Mole.h
index 1457c72cc..da3a151a2 100644
--- a/src/engine/objects/Mole.h
+++ b/src/engine/objects/Mole.h
@@ -22,6 +22,9 @@ class OMoleGroup;
class OMole : public OObject {
public:
explicit OMole(FVector pos, OMoleGroup* group);
+ ~OMole() {
+ _count--;
+ }
virtual void Tick() override;
virtual void Draw(s32 cameraId) override;
diff --git a/src/engine/objects/MoleGroup.h b/src/engine/objects/MoleGroup.h
index 31d9c2819..901f3c2f5 100644
--- a/src/engine/objects/MoleGroup.h
+++ b/src/engine/objects/MoleGroup.h
@@ -22,6 +22,9 @@ public:
* The mole must also be ready to jump to be considered.
*/
explicit OMoleGroup(std::vector<FVector>& moles, size_t tickRate);
+ ~OMoleGroup() {
+ _count--;
+ }
virtual void Tick() override;