Fix bugs dont despawn cheat to work with soil patches (#3457)

This commit is contained in:
Adam Bird 2023-11-28 20:02:45 -05:00 committed by GitHub
parent 02256fac66
commit 33fe8776bb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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();
@ -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;