diff options
author | Nikolay <nickvnuk@gmail.com> | 2020-11-11 11:19:21 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-11-11 11:19:21 +0100 |
commit | a8b530320738516aaf7c3b06faa495afbf36b430 (patch) | |
tree | b1ee231e9c97138f6c16c4d5079583f92b268251 /src/control/Pickups.cpp | |
parent | fix (diff) | |
download | re3-a8b530320738516aaf7c3b06faa495afbf36b430.tar re3-a8b530320738516aaf7c3b06faa495afbf36b430.tar.gz re3-a8b530320738516aaf7c3b06faa495afbf36b430.tar.bz2 re3-a8b530320738516aaf7c3b06faa495afbf36b430.tar.lz re3-a8b530320738516aaf7c3b06faa495afbf36b430.tar.xz re3-a8b530320738516aaf7c3b06faa495afbf36b430.tar.zst re3-a8b530320738516aaf7c3b06faa495afbf36b430.zip |
Diffstat (limited to '')
-rw-r--r-- | src/control/Pickups.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/control/Pickups.cpp b/src/control/Pickups.cpp index c658fcb8..e53f1ecb 100644 --- a/src/control/Pickups.cpp +++ b/src/control/Pickups.cpp @@ -1416,7 +1416,7 @@ CPickups::RemoveUnnecessaryPickups(const CVector& center, float radius) { for (int i = 0; i < NUMPICKUPS; i++) { if (aPickUps[i].m_eType == PICKUP_ONCE_TIMEOUT || aPickUps[i].m_eType == PICKUP_MONEY) { - if ((aPickUps[i].m_vecPos - center).Magnitude() < radius) { + if (Distance(center, aPickUps[i].m_vecPos) < radius) { aPickUps[i].GetRidOfObjects(); aPickUps[i].m_bRemoved = true; aPickUps[i].m_eType = PICKUP_NONE; |