diff options
| author | LagoLunatic <LagoLunatic@users.noreply.github.com> | 2025-08-08 21:51:30 -0400 |
|---|---|---|
| committer | LagoLunatic <LagoLunatic@users.noreply.github.com> | 2025-08-08 21:51:30 -0400 |
| commit | 5802571a5680c65e2fcdd39bceac26d42f490d64 (patch) | |
| tree | 371d72242beb595fd0887c025846062cf7a75efa /src/d/d_snap.cpp | |
| parent | b24d8574cdef4f7e4521b2b0c72e0a8775706d9c (diff) | |
Add SQUARE macro to improve readibility for distances
Diffstat (limited to 'src/d/d_snap.cpp')
| -rw-r--r-- | src/d/d_snap.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/d/d_snap.cpp b/src/d/d_snap.cpp index f36bf744..9afd19d9 100644 --- a/src/d/d_snap.cpp +++ b/src/d/d_snap.cpp @@ -1817,12 +1817,12 @@ int dSnap_packet::Regist(const dSnap_Obj& obj) { if (!r6) { return 0; } - f32 dist2 = player->current.pos.abs2(obj.mCenter); - if (obj.GetPhoto() >= 0x48 && dist2 > f30) { + f32 dist_sq = player->current.pos.abs2(obj.mCenter); + if (obj.GetPhoto() >= 0x48 && dist_sq > f30) { return 0; } m_tbl[r29].Regist(obj); - m_tbl[r29].field_0x34 = dist2; + m_tbl[r29].field_0x34 = dist_sq; return 0; } else { m_tbl[field_0x14].Regist(obj); |
