diff options
| author | LagoLunatic <LagoLunatic@users.noreply.github.com> | 2026-07-22 20:13:31 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-07-22 20:13:31 -0400 |
| commit | 96347ab5028b6ef8ed8f5901f7d16ad51ab99cd4 (patch) | |
| tree | 0eb673b76d240ac04a8805632c8fb4b4d47d71c5 /src/d/actor/d_a_kb.cpp | |
| parent | bf372802ca81f2c2eb5ae18a5908a2d84e1d3139 (diff) | |
Clean up angle constants and conversions (#1135)
* Add angle conversion constants and macros
* Replace angle literals with hex instead of decimal
Diffstat (limited to 'src/d/actor/d_a_kb.cpp')
| -rw-r--r-- | src/d/actor/d_a_kb.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/d/actor/d_a_kb.cpp b/src/d/actor/d_a_kb.cpp index 873973bd..ec5297ab 100644 --- a/src/d/actor/d_a_kb.cpp +++ b/src/d/actor/d_a_kb.cpp @@ -637,7 +637,7 @@ void target_set(kb_class* i_this, u8 param_1) { case 0: temp = actor->shape_angle.y; if(i_this->m426[3] == 0) { - temp = way_check(i_this, cM_rndFX(32768.0f), 0); + temp = way_check(i_this, cM_rndFX(0x8000), 0); } break; @@ -1664,7 +1664,7 @@ void attack_move(kb_class* i_this) { } else { if((s16)cLib_distanceAngleS(actor->current.angle.y, i_this->m442) < 0x100) { - i_this->m442 = fopAcM_searchPlayerAngleY(actor) + cM_rndFX(4096.0f); + i_this->m442 = fopAcM_searchPlayerAngleY(actor) + cM_rndFX(0x1000); } i_this->m5D4[0] = actor->current.pos; @@ -1761,7 +1761,7 @@ void money_drop(kb_class* i_this) { rnd *= 10.0f; u32 temp2 = gold_rate_dt[(int)(0.3f * rnd)]; i_this->m407 = 1; - cMtx_YrotS(*calc_mtx, cM_rndFX(32768.0f)); + cMtx_YrotS(*calc_mtx, cM_rndFX(0x8000)); temp3.set(0.0f, 0.0f, 20.0f); MtxPosition(&temp3, &temp4); temp4 += actor->current.pos; @@ -1782,7 +1782,7 @@ void money_drop(kb_class* i_this) { rnd *= 10.0f; u32 temp2 = item_rate_dt[(int)(0.3f * rnd)]; i_this->m407 = 1; - cMtx_YrotS(*calc_mtx, cM_rndFX(32768.0f)); + cMtx_YrotS(*calc_mtx, cM_rndFX(0x8000)); temp3.set(0.0f, 0.0f, 20.0f); MtxPosition(&temp3, &temp4); temp4 += actor->current.pos; |
