diff options
| author | Max Roncace <me@caseif.net> | 2026-03-18 01:38:05 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-03-17 22:38:05 -0700 |
| commit | 6694c1b281a142972fce587bd20cd82ee65ab38f (patch) | |
| tree | 2537d09d5ab3d270eaca5143a4f2f2f65f4ecb49 /src/d/actor/d_a_npc_grs.cpp | |
| parent | 9f340b604b5ac3d19d330b7bd6a2d7355c58bc27 (diff) | |
Fix a bunch of compiler warnings and document several more bugs (#3130)
Diffstat (limited to 'src/d/actor/d_a_npc_grs.cpp')
| -rw-r--r-- | src/d/actor/d_a_npc_grs.cpp | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/src/d/actor/d_a_npc_grs.cpp b/src/d/actor/d_a_npc_grs.cpp index 05d1356a47..f9ef95fbec 100644 --- a/src/d/actor/d_a_npc_grs.cpp +++ b/src/d/actor/d_a_npc_grs.cpp @@ -138,10 +138,13 @@ int daNpc_grS_c::create() { mType = getTypeFromParam(); + // !@bug home.angle.x is promoted to a 32-bit signed integer prior + // to being compared, so the compared value can never exceed + // SHORT_MAX and the condition always passes. if (home.angle.x != 0xffff) { - field_0xe0c = home.angle.x; + mFlowID = home.angle.x; } else { - field_0xe0c = -1; + mFlowID = -1; } if (isDelete()) { @@ -856,7 +859,7 @@ int daNpc_grS_c::selectAction() { mpNextActionFn = &daNpc_grS_c::test; } else { - (int)mType; + UNUSED((int)mType); mpNextActionFn = &daNpc_grS_c::wait; } @@ -936,7 +939,7 @@ int daNpc_grS_c::doEvent() { if (eventInfo.checkCommandDemoAccrpt() && mEventIdx != -1 && eventManager->endCheck(mEventIdx)) { - (int)mOrderEvtNo; + UNUSED((int)mOrderEvtNo); dComIfGp_event_reset(); mOrderEvtNo = 0; mEventIdx = -1; @@ -1157,7 +1160,7 @@ int daNpc_grS_c::talk(void* param_0) { daNpcF_offTmpBit(11); } - unkInt1 = field_0xe0c; + unkInt1 = mFlowID; mIsSpeaking = false; initTalk(unkInt1, NULL); mTurnMode = 0; |
