diff options
author | Nikolay <nickvnuk@gmail.com> | 2020-11-11 13:19:21 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-11-11 13:19:21 +0300 |
commit | a8b530320738516aaf7c3b06faa495afbf36b430 (patch) | |
tree | b1ee231e9c97138f6c16c4d5079583f92b268251 /src/control | |
parent | 35874b5fd2b55e92a5033524178aa3bbcabdf8d7 (diff) |
Update src/control/Pickups.cpp
Co-authored-by: Sergeanur <s.anureev@yandex.ua>
Diffstat (limited to 'src/control')
-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; |