Skip to content

Commit 854e460

Browse files
authored
d_a_e_kg equivalent (#2322)
1 parent 763400c commit 854e460

File tree

2 files changed

+22
-22
lines changed

2 files changed

+22
-22
lines changed

configure.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1636,7 +1636,7 @@ def MatchingFor(*versions):
16361636
ActorRel(NonMatching, "d_a_e_hz"),
16371637
ActorRel(NonMatching, "d_a_e_hzelda"),
16381638
ActorRel(NonMatching, "d_a_e_is"),
1639-
ActorRel(NonMatching, "d_a_e_kg"),
1639+
ActorRel(Equivalent, "d_a_e_kg"),
16401640
ActorRel(NonMatching, "d_a_e_kk"),
16411641
ActorRel(NonMatching, "d_a_e_kr"),
16421642
ActorRel(MatchingFor("GZ2E01"), "d_a_e_mb"),

src/d/actor/d_a_e_kg.cpp

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ static void damage_check(e_kg_class* i_this) {
113113
i_this->field_0xa54 = 15;
114114
}
115115

116-
i_this->current.angle.y = i_this->mAtInfo.mHitDirection;
116+
i_this->current.angle.y = i_this->mAtInfo.mHitDirection.y;
117117
i_this->field_0x678 = 0;
118118
}
119119

@@ -384,7 +384,7 @@ static void e_kg_damage(e_kg_class* i_this) {
384384
anm_init(i_this, 0x6, 5.0f, 2, 1.0f);
385385
i_this->field_0x678 = 1;
386386
i_this->speed.y = cM_rndFX(5.0f) + 45.0f;
387-
i_this->speedF = cM_rndFX(5.0f) + 35.0f;
387+
i_this->speedF = cM_rndFX(5.0f) + -35.0f;
388388
i_this->field_0x69e = cM_rndFX(1700.0f);
389389
i_this->mSound.startCreatureVoice(Z2SE_EN_KG_V_DEATH, -1);
390390
fopAcM_OffStatus(i_this, 0);
@@ -487,11 +487,11 @@ static void e_kg_roof(e_kg_class* i_this) {
487487

488488
/* 806F90F8-806F9400 0012F8 0308+00 2/1 0/0 0/0 .text action__FP10e_kg_class */
489489
static void action(e_kg_class* i_this) {
490-
// NONMATCHING - regalloc
490+
fopAc_ac_c* actor_this = i_this;
491491
cXyz my_vec_0;
492492
cXyz my_vec_1;
493-
i_this->mPlayerAngle = fopAcM_searchPlayerAngleY(i_this);
494-
i_this->mPlayerDist = fopAcM_searchPlayerDistance(i_this);
493+
i_this->mPlayerAngle = fopAcM_searchPlayerAngleY(actor_this);
494+
i_this->mPlayerDist = fopAcM_searchPlayerDistance(actor_this);
495495
damage_check(i_this);
496496
i_this->mSph.OffAtVsPlayerBit();
497497
s16 max_step = 0;
@@ -544,32 +544,32 @@ static void action(e_kg_class* i_this) {
544544
}
545545
}
546546

547-
cMtx_YrotS(*calc_mtx, i_this->current.angle.y);
547+
cMtx_YrotS(*calc_mtx, actor_this->current.angle.y);
548548
my_vec_0.x = 0.0;
549549
my_vec_0.y = 0.0;
550-
my_vec_0.z = i_this->speedF;
550+
my_vec_0.z = actor_this->speedF;
551551
MtxPosition(&my_vec_0, &my_vec_1);
552-
i_this->speed.x = my_vec_1.x;
553-
i_this->speed.z = my_vec_1.z;
554-
i_this->current.pos += i_this->speed;
555-
i_this->speed.y -= 5.0f;
552+
actor_this->speed.x = my_vec_1.x;
553+
actor_this->speed.z = my_vec_1.z;
554+
actor_this->current.pos += actor_this->speed;
555+
actor_this->speed.y -= 5.0f;
556556
cXyz* cc_move_p = i_this->mStts.GetCCMoveP();
557557
if (cc_move_p != NULL) {
558-
i_this->current.pos.x += cc_move_p->x;
559-
i_this->current.pos.y += cc_move_p->y;
560-
i_this->current.pos.z += cc_move_p->z;
558+
actor_this->current.pos.x += cc_move_p->x;
559+
actor_this->current.pos.y += cc_move_p->y;
560+
actor_this->current.pos.z += cc_move_p->z;
561561
}
562562

563563
f32 pos_adjust = 0.0f;
564-
if (i_this->shape_angle.x) {
565-
pos_adjust = cM_ssin(i_this->shape_angle.x / 2) * 30.0f;
564+
if (actor_this->shape_angle.x) {
565+
pos_adjust = cM_ssin(actor_this->shape_angle.x / 2) * 30.0f;
566566
}
567567

568-
i_this->current.pos.y -= pos_adjust;
569-
i_this->old.pos.y -= pos_adjust;
568+
actor_this->current.pos.y -= pos_adjust;
569+
actor_this->old.pos.y -= pos_adjust;
570570
i_this->mAcch.CrrPos(dComIfG_Bgsp());
571-
i_this->current.pos.y += pos_adjust;
572-
i_this->old.pos.y += pos_adjust;
571+
actor_this->current.pos.y += pos_adjust;
572+
actor_this->old.pos.y += pos_adjust;
573573
if (new_0x670) {
574574
i_this->field_0x670 = new_0x670;
575575
} else if (i_this->field_0x66c == 0) {
@@ -651,7 +651,7 @@ static int daE_KG_Execute(e_kg_class* i_this) {
651651

652652
/* 806F97A8-806F97B0 0019A8 0008+00 1/0 0/0 0/0 .text daE_KG_IsDelete__FP10e_kg_class */
653653
static int daE_KG_IsDelete(e_kg_class* i_this) {
654-
return true;
654+
return 1;
655655
}
656656

657657
/* 806F97B0-806F9818 0019B0 0068+00 1/0 0/0 0/0 .text daE_KG_Delete__FP10e_kg_class */

0 commit comments

Comments
 (0)