daObjNAN_c equivalent (#2320)

* daObjNAN_c equivalent

* Remove padding
This commit is contained in:
hatal175
2025-03-10 01:05:03 +02:00
committed by GitHub
parent 800049a811
commit 763400c4c0
14 changed files with 802 additions and 955 deletions
+1 -1
View File
@@ -146,7 +146,7 @@ static void damage_check(e_ba_class* i_this) {
i_this->mIFrames = 10;
}
i_this->mKnockbackSpeed = 80.0f;
i_this->mKnockbackAngle = i_this->mAtInfo.mHitDirection;
i_this->mKnockbackAngle = i_this->mAtInfo.mHitDirection.y;
if (i_this->health <= 0) {
i_this->mCreatureSound.startCreatureVoice(Z2SE_EN_BA_V_DEATH, -1);
i_this->mpMorf->setPlaySpeed(0.2f);
+1 -1
View File
@@ -438,7 +438,7 @@ static void damage_check(e_fs_class* i_this) {
} else {
i_this->mIFrameTimer = 10;
}
i_this->current.angle.y = i_this->mAtInfo.mHitDirection;
i_this->current.angle.y = i_this->mAtInfo.mHitDirection.y;
if (i_this->health <= 0) {
i_this->mAction = e_fs_class::ACT_END;
+1 -1
View File
@@ -253,7 +253,7 @@ void daE_FZ_c::damage_check() {
dComIfGp_setHitMark(3,this,&pos3,&s_pos,0,AT_TYPE_0);
}
mLastWallHitAngle = mAtInfo.mHitDirection;
mLastWallHitAngle = mAtInfo.mHitDirection.y;
setReflectAngle();
current.angle.y += -32768;
field_0x712 = 10;
+1 -1
View File
@@ -740,7 +740,7 @@ void daE_OctBg_c::damage() {
field_0x8c0.OffTgSetBit();
field_0x9f8.OffAtSetBit();
attention_info.flags = 0;
current.angle.y = field_0xb30.mHitDirection + 0x8000;
current.angle.y = field_0xb30.mHitDirection.y + 0x8000;
speedF = 10.0f;
field_0xb96 = 0x1000;
speed.y = 0.0f;
+1 -1
View File
@@ -550,7 +550,7 @@ void daE_OT_c::executeDamage() {
mMode = 1;
mAnmSpeed = 1.0f;
gravity = -5.0f;
current.angle.y = mAtInfo.mHitDirection + 0x8000 + cM_rndFX(0x2000);
current.angle.y = mAtInfo.mHitDirection.y + 0x8000 + cM_rndFX(0x2000);
break;
case 1:
+1 -1
View File
@@ -175,7 +175,7 @@ static void damage_check(e_yk_class* i_this) {
}
i_this->field_0x694 = cM_rndF(10.0f) + 70.0f;
i_this->field_0x698 = i_this->mAtColliderInfo.mHitDirection;
i_this->field_0x698 = i_this->mAtColliderInfo.mHitDirection.y;
// If keese is dead, play death sound
if (i_this->health <= 0) {
+1 -1
View File
@@ -964,7 +964,7 @@ void daE_YM_c::executeDown() {
field_0x668.set(0, 0, 0);
speedF = cM_rndF(5.0f) + 15.0f;
speed.y = cM_rndF(5.0f) + 40.0f;
shape_angle.y = mAtInfo.mHitDirection + 0x8000;
shape_angle.y = mAtInfo.mHitDirection.y + 0x8000;
shape_angle.x = 0;
mAcch.ClrGroundHit();
mAcchCir.SetWall(40.0f, 60.0f);
File diff suppressed because it is too large Load Diff
+4 -4
View File
@@ -390,23 +390,23 @@ fopAc_ac_c* cc_at_check(fopAc_ac_c* i_enemy, dCcU_AtInfo* i_AtInfo) {
if (tmp.abs() > 100.0f) {
f32 x = i_AtInfo->mpActor->speed.x;
f32 z = i_AtInfo->mpActor->speed.z;
i_AtInfo->mHitDirection = cM_atan2s(-x, -z) + (s16)cM_rndFX(4000.0f);
i_AtInfo->mHitDirection.y = cM_atan2s(-x, -z) + (s16)cM_rndFX(4000.0f);
} else {
if (fopAcM_GetName(i_AtInfo->mpActor) == PROC_BOOMERANG) {
x_diff = i_enemy->current.pos.x - player_p->current.pos.x;
z_diff = i_enemy->current.pos.z - player_p->current.pos.z;
i_AtInfo->mHitDirection = cM_atan2s(-x_diff, -z_diff) + (s16)cM_rndFX(10000.0f);
i_AtInfo->mHitDirection.y = cM_atan2s(-x_diff, -z_diff) + (s16)cM_rndFX(10000.0f);
} else {
x_diff = i_enemy->current.pos.x - i_AtInfo->mpActor->current.pos.x;
z_diff = i_enemy->current.pos.z - i_AtInfo->mpActor->current.pos.z;
i_AtInfo->mHitDirection = cM_atan2s(-x_diff, -z_diff);
i_AtInfo->mHitDirection.y = cM_atan2s(-x_diff, -z_diff);
}
}
if (i_AtInfo->mHitType == HIT_TYPE_LINK_NORMAL_ATTACK &&
player_p->getCutType() == daPy_py_c::CUT_TYPE_HEAD_JUMP)
{
i_AtInfo->mHitDirection = player_p->shape_angle.y;
i_AtInfo->mHitDirection.y = player_p->shape_angle.y;
}
if (i_AtInfo->mpCollider->ChkAtType(AT_TYPE_HOOKSHOT) &&