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_detect.cpp | |
| parent | b24d8574cdef4f7e4521b2b0c72e0a8775706d9c (diff) | |
Add SQUARE macro to improve readibility for distances
Diffstat (limited to 'src/d/d_detect.cpp')
| -rw-r--r-- | src/d/d_detect.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/d/d_detect.cpp b/src/d/d_detect.cpp index 5fc21747..333d4406 100644 --- a/src/d/d_detect.cpp +++ b/src/d/d_detect.cpp @@ -95,7 +95,7 @@ void dDetect_c::set_quake(const cXyz* pos) { /* 8009C254-8009C32C .text chk_quake_area__9dDetect_cCFPC4cXyz */ bool dDetect_c::chk_quake_area(const cXyz* pos) const { daPy_py_c* player = daPy_getPlayerActorClass(); - f32 maxDist2XZ = attr().maxDistXZ * attr().maxDistXZ; + f32 maxDist2XZ = SQUARE(attr().maxDistXZ); f32 dist2XZ = player->current.pos.abs2XZ(*pos); f32 diffY = pos->y - player->current.pos.y; return dist2XZ <= maxDist2XZ && diffY <= attr().maxY && diffY >= attr().minY; |
