summaryrefslogtreecommitdiff
path: root/src/d/actor/d_a_player_npc.cpp
diff options
context:
space:
mode:
authorLagoLunatic <LagoLunatic@users.noreply.github.com>2023-10-09 08:27:32 -0400
committerLagoLunatic <LagoLunatic@users.noreply.github.com>2023-10-09 15:45:46 -0400
commit2e70dd019bfd554d05da73da44f37c610e93de29 (patch)
treeba8055c3cc95eda009767313cebf71f685a2a0a7 /src/d/actor/d_a_player_npc.cpp
parent387a9bf4caca872264bb73ce35b25c7c551a1f3e (diff)
d_bg_s_acch 70%
Diffstat (limited to 'src/d/actor/d_a_player_npc.cpp')
-rw-r--r--src/d/actor/d_a_player_npc.cpp13
1 files changed, 4 insertions, 9 deletions
diff --git a/src/d/actor/d_a_player_npc.cpp b/src/d/actor/d_a_player_npc.cpp
index 369085e5..c6a237a6 100644
--- a/src/d/actor/d_a_player_npc.cpp
+++ b/src/d/actor/d_a_player_npc.cpp
@@ -177,19 +177,14 @@ void daPy_npc_c::drawDamageFog() {
return;
}
- cXyz temp;
- f32 temp_f1;
- f32 temp_f2;
- mDoLib_pos2camera(&current.pos, &temp);
- temp_f2 = fabs(cM_ssin(g_Counter.mTimer * 0x800));
+ cXyz camPos;
+ mDoLib_pos2camera(&current.pos, &camPos);
+ f32 adjust = fabsf(cM_ssin(g_Counter.mTimer * 0x800));
mTevStr.mFogColor.r = 255;
mTevStr.mFogColor.g = 60;
mTevStr.mFogColor.b = 60;
- temp_f1 = -temp.z;
- temp_f1 -= 200.0f;
- temp_f2 = 200.0f * temp_f2;
- mTevStr.mFogStartZ = temp_f1 + temp_f2;
+ mTevStr.mFogStartZ = (-camPos.z - 200.0f) + 200.0f * adjust;
mTevStr.mFogEndZ = mTevStr.mFogStartZ + 300.0f;
}