summaryrefslogtreecommitdiff
path: root/src/d/actor/d_a_fire.cpp
diff options
context:
space:
mode:
authorLagoLunatic <LagoLunatic@users.noreply.github.com>2025-05-24 18:54:46 -0400
committerGitHub <noreply@github.com>2025-05-24 18:54:46 -0400
commit7cd75e8f7b01a45ca8c72facfd5b4a3c1906c0e1 (patch)
treeece493d144cfcb3af860c2af8fa0480491f69706 /src/d/actor/d_a_fire.cpp
parent4a29f64e6bf5a06a541161638913f51c51d8a633 (diff)
Demo matches (#767)
Diffstat (limited to 'src/d/actor/d_a_fire.cpp')
-rw-r--r--src/d/actor/d_a_fire.cpp20
1 files changed, 12 insertions, 8 deletions
diff --git a/src/d/actor/d_a_fire.cpp b/src/d/actor/d_a_fire.cpp
index 4390e4aa..d534bd75 100644
--- a/src/d/actor/d_a_fire.cpp
+++ b/src/d/actor/d_a_fire.cpp
@@ -261,6 +261,8 @@ void daFire_c::search_wind() {
/* 00000AD8-00000E8C .text ctrlEffect__8daFire_cFv */
void daFire_c::ctrlEffect() {
+ f32 f31 = 0.025f;
+
if (field_0x902 == 0) {
return;
}
@@ -285,7 +287,8 @@ void daFire_c::ctrlEffect() {
} else if (hit_obj->ChkAtType(AT_TYPE_WIND) && wind != field_0x2CC[0].GetTgHitAc()) {
field_0x8E0 = *field_0x2CC[0].GetTgRVecP();
- f32 dist_sq = (field_0x8E0.x * field_0x8E0.x + field_0x8E0.z * field_0x8E0.z) / 1000.0f;
+ f32 f2 = 1000.0f;
+ f32 dist_sq = (field_0x8E0.x * field_0x8E0.x + field_0x8E0.z * field_0x8E0.z) / f2;
field_0x8E0.y = sqrt(dist_sq);
if (!field_0x8E0.normalizeRS()) {
field_0x8E0.set(0.0f, 1.0f, 0.0f);
@@ -296,9 +299,9 @@ void daFire_c::ctrlEffect() {
field_0x2CC[0].ClrTgHit();
} else {
- cLib_chaseF(&field_0x8E0.x, 0.0f, 0.025f);
- cLib_chaseF(&field_0x8E0.y, 1.0f, 0.025f);
- cLib_chaseF(&field_0x8E0.z, 0.0f, 0.025f);
+ cLib_chaseF(&field_0x8E0.x, 0.0f, f31);
+ cLib_chaseF(&field_0x8E0.y, 1.0f, f31);
+ cLib_chaseF(&field_0x8E0.z, 0.0f, f31);
}
if (field_0x8D1 == 0 && field_0x8D2 != 0) {
@@ -373,7 +376,7 @@ void daFire_c::eventOrder() {
} else {
field_0x903 = 5;
}
- } else if (mType == 0 && dComIfGs_isSwitch(mSwitchNo, fopAcM_GetHomeRoomNo(this))) {
+ } else if (mType == 0 && fopAcM_isSwitch(this, mSwitchNo)) {
flag = 1;
}
@@ -467,9 +470,10 @@ void daFire_c::execPlayFire() {
/* 00001408-000014E4 .text setDirParticle__8daFire_cFP4cXyz */
void daFire_c::setDirParticle(cXyz* dir) {
- cLib_chaseF(&field_0x8D4.x, dir->x, 1.0f);
- cLib_chaseF(&field_0x8D4.y, dir->y, 1.0f);
- cLib_chaseF(&field_0x8D4.z, dir->z, 1.0f);
+ f32 f31 = 1.0f;
+ cLib_chaseF(&field_0x8D4.x, dir->x, f31);
+ cLib_chaseF(&field_0x8D4.y, dir->y, f31);
+ cLib_chaseF(&field_0x8D4.z, dir->z, f31);
if (field_0x8BC) {
field_0x8BC->setDirection(JGeometry::TVec3<f32>(field_0x8D4));