Renamed Entity fields for knockback

SolidifiedGaming identified these while glitchhunting.
This commit is contained in:
Ibot02
2021-10-25 13:32:54 +02:00
parent 9bca0fe57f
commit 59076fccb7
33 changed files with 87 additions and 87 deletions
+2 -2
View File
@@ -34,7 +34,7 @@ void sub_080A9334(Entity* this) {
if ((this->bitfield & 0x3f) != 0) {
ModHealth(-2);
sub_080A9488(this);
this->field_0x42 = 0;
this->knockbackDuration = 0;
this->iframes = 0;
} else {
DeleteThisEntity();
@@ -107,7 +107,7 @@ void sub_080A9488(Entity* this) {
this->flags &= 0x7f;
this->actionDelay = 2;
this->field_0x20 = 0x18000;
this->animationState = (this->field_0x3e & 0x18) >> 3;
this->animationState = (this->knockbackDirection & 0x18) >> 3;
EnqueueSFX(SFX_METAL_CLINK);
sub_080A94C0(this, this->animationState);
}
+1 -1
View File
@@ -27,7 +27,7 @@ void sub_080AB544(Entity* this) {
if (this->iframes < -4) {
this->action = 2;
this->direction = this->field_0x3e;
this->direction = this->knockbackDirection;
tmp = (this->type ^ 2) << 3;
if (this->direction - tmp + 1 < 3) {
this->direction = tmp;
+5 -5
View File
@@ -30,7 +30,7 @@ void sub_080A8470(Entity* this) {
}
DeleteEntity(this);
} else {
this->direction = (this->field_0x3e + 4) & 0x18;
this->direction = DirectionRoundUp(this->knockbackDirection);
if ((u8)(this->bitfield + 0x7e) < 2) {
sub_080A8680(this);
} else {
@@ -74,14 +74,14 @@ void DekuSeedProjectile_Action1(Entity* this) {
parent = this->parent;
if ((parent->next != NULL) && (sub_080177A0(this, parent) != 0)) {
this->iframes = 0x10;
this->field_0x3e = -this->direction;
this->knockbackDirection = -this->direction;
this->bitfield = -0x80;
this->field_0x42 = 0xc;
this->knockbackDuration = 0xc;
this->field_0x46 = 0;
parent->iframes = 0x10;
parent->field_0x3e = this->direction;
parent->knockbackDirection = this->direction;
parent->bitfield = -0x3e;
parent->field_0x42 = 0xc;
parent->knockbackDuration = 0xc;
parent->field_0x46 = 0;
}
}
+1 -1
View File
@@ -35,7 +35,7 @@ void GuardLineOfSight(Entity* this) {
entity = CreateProjectile(0xc);
if (entity != NULL) {
entity->type = 1;
tmp = this->parent->field_0x3e;
tmp = this->parent->knockbackDirection;
entity->direction = (gUnk_081299C8[(this->actionDelay >> 2 & 7)] + (tmp << 3)) & 0x1f;
entity->parent = this->parent;
CopyPosition(this, entity);
+3 -3
View File
@@ -66,14 +66,14 @@ void sub_080A9EBC(Entity* this) {
default:
parent = this->parent;
parent->iframes = this->iframes;
parent->field_0x3e = this->field_0x3e;
parent->field_0x42 = this->field_0x42;
parent->knockbackDirection = this->knockbackDirection;
parent->knockbackDuration = this->knockbackDuration;
if (this->action == 1) {
sub_080AA320(this);
}
break;
}
this->field_0x42 = 0;
this->knockbackDuration = 0;
}
}
+4 -4
View File
@@ -27,7 +27,7 @@ void sub_080A832C(Entity* this) {
if (this->bitfield == 0x80) {
this->iframes = 0x10;
this->field_0x42 = 0xc;
this->knockbackDuration = 0xc;
this->field_0x46 = 0x180;
this->parent->bitfield = this->bitfield;
}
@@ -37,10 +37,10 @@ void sub_080A832C(Entity* this) {
} else {
this->parent->iframes = -tmp;
}
this->parent->field_0x42 = this->field_0x42;
this->parent->knockbackDuration = this->knockbackDuration;
this->parent->field_0x46 = this->field_0x46;
this->parent->field_0x3e = this->field_0x3e;
this->field_0x42 = 0;
this->parent->knockbackDirection = this->knockbackDirection;
this->knockbackDuration = 0;
}
void MoblinSpear_Init(Entity* this) {
+3 -3
View File
@@ -84,7 +84,7 @@ void OctorokBossProjectile_Action1(Entity* this) {
if ((this->bitfield & 0x7f) == 0) {
OctorokBossProjectile_Action2(this);
}
this->direction = this->field_0x3e << 3;
this->direction = this->knockbackDirection << 3;
this->speed = 0x400;
this->type2 = 1;
this->actionDelay = 0;
@@ -98,9 +98,9 @@ void OctorokBossProjectile_Action1(Entity* this) {
this->parent->currentHealth -= 1;
this->parent->iframes = 0x1e;
if (this->parent->field_0x7c.BYTES.byte0 != 0) {
this->parent->field_0x42 = 0x18;
this->parent->knockbackDuration = 0x18;
this->parent->field_0x46 = 0x200;
this->parent->field_0x3e = this->direction >> 3;
this->parent->knockbackDirection = this->direction >> 3;
}
SoundReq(SFX_BOSS_HIT);
OctorokBossProjectile_Action2(this);
+1 -1
View File
@@ -23,7 +23,7 @@ void sub_080A8064(Entity* this) {
if (this->bitfield == 0x80) {
DeleteEntity(this);
} else {
this->direction = this->field_0x3e;
this->direction = this->knockbackDirection;
sub_080A8178(this);
}
}
+2 -2
View File
@@ -49,8 +49,8 @@ void sub_080AAC44(Entity* this) {
CopyPosition(this->parent, this);
}
}
if (this->field_0x42 != 0) {
this->field_0x42 = 0;
if (this->knockbackDuration != 0) {
this->knockbackDuration = 0;
}
}