Correct type of sub_0806F520 and use it as a bool

This commit is contained in:
Elliptic Ellipsis
2022-03-18 23:16:15 +00:00
parent d6c8cf0250
commit 7780c76eac
15 changed files with 15 additions and 15 deletions
+1 -1
View File
@@ -123,7 +123,7 @@ void Chuchu_OnCollision(Entity* this) {
}
void Chuchu_OnGrabbed(Entity* this) {
if (sub_0806F520(this) == 0 && this->confusedTime) {
if (!sub_0806F520(this) && this->confusedTime) {
Create0x68FX(this, FX_STARS);
InitializeAnimation(this, 6);
} else {
+1 -1
View File
@@ -154,7 +154,7 @@ void sub_08040D30(Enemy50Entity* this) {
}
void sub_08040D90(Enemy50Entity* this) {
if (sub_0806F520()) {
if (sub_0806F520(super)) {
Enemy50_SubActions[super->subAction](this);
} else {
sub_08041128(this);
+1 -1
View File
@@ -113,7 +113,7 @@ void Ghini_OnConfused(GhiniEntity* this) {
}
void Ghini_OnGrabbed(GhiniEntity* this) {
if (sub_0806F520()) {
if (sub_0806F520(super)) {
Ghini_SubActions[super->subAction](this);
} else {
sub_0803F51C(this);
+1 -1
View File
@@ -56,7 +56,7 @@ void GyorgChild_OnGrabbed(GyorgChildEntity* this) {
GyorgChild_OnGrabbed_Action1,
GyorgChild_OnGrabbed_Action3,
};
if (sub_0806F520()) {
if (sub_0806F520(super)) {
GyorgChild_OnGrabbed_Actions[super->subAction](this);
}
}
+1 -1
View File
@@ -34,7 +34,7 @@ void LakituCloud_OnKnockback(Entity* this) {
}
void LakituCloud_OnGrabbed(Entity* this) {
if (sub_0806F520(this) == 0) {
if (!sub_0806F520(this)) {
if (this->subAction == 2) {
sub_0803CE3C(this);
}
+1 -1
View File
@@ -39,7 +39,7 @@ void Rope_OnCollision(Entity* this) {
}
void Rope_OnGrabbed(Entity* this) {
if (sub_0806F520()) {
if (sub_0806F520(this)) {
gUnk_080CE470[this->subAction](this);
}
}
+1 -1
View File
@@ -123,7 +123,7 @@ void sub_08039418(StalfosEntity* this) {
}
void sub_08039438(StalfosEntity* this) {
if (sub_0806F520()) {
if (sub_0806F520(super)) {
Stalfos_SubActions[super->subAction](this);
}
}
+1 -1
View File
@@ -74,7 +74,7 @@ void Takkuri_OnCollision(TakkuriEntity* this) {
void Takkuri_OnGrabbed(TakkuriEntity* this) {
gUnk_080CFF6C[super->subAction](this);
GetNextFrame(super);
if (sub_0806F520(super) == 0) {
if (!sub_0806F520(super)) {
super->action = 2;
super->subAction = 0;
this->unk_0x84 = 2;
+1 -1
View File
@@ -69,7 +69,7 @@ void Wisp_OnCollision(Entity* this) {
}
void Wisp_OnGrabbed(Entity* this) {
if (sub_0806F520() != 0) {
if (sub_0806F520(this)) {
gUnk_080CEB98[this->subAction](this);
}
}