Skip to content

Commit

Permalink
Fix bugs dont despawn cheat to work with soil patches (HarbourMasters…
Browse files Browse the repository at this point in the history
  • Loading branch information
Archez authored Nov 29, 2023
1 parent 02256fa commit 33fe877
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions soh/src/overlays/actors/ovl_En_Insect/z_en_insect.c
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,13 @@ void EnInsect_Init(Actor* thisx, PlayState* play2) {

func_80A7D39C(this);

// For bugs that aren't linked to a soil patch, we remove the "short lived" flag to prevent them from despawning
// And exit early to not increment the "bugs dropped count"
if (CVarGetInteger("gNoBugsDespawn", 0) && this->soilActor == NULL) {
this->unk_314 &= ~4;
return;
}

D_80A7DEB8++;
} else {
rand = Rand_ZeroOne();
Expand Down Expand Up @@ -394,9 +401,6 @@ void func_80A7CAD0(EnInsect* this, PlayState* play) {
}

void func_80A7CBC8(EnInsect* this) {
if (CVarGetInteger("gNoBugsDespawn", 0) != 0) {
return;
}
this->unk_31A = 60;
func_80A7BF58(this);
this->skelAnime.playSpeed = 1.9f;
Expand Down

0 comments on commit 33fe877

Please sign in to comment.