summaryrefslogtreecommitdiffstats
path: root/src/control/Pickups.cpp
diff options
context:
space:
mode:
authorNikolay <nickvnuk@gmail.com>2020-11-11 11:19:21 +0100
committerGitHub <noreply@github.com>2020-11-11 11:19:21 +0100
commita8b530320738516aaf7c3b06faa495afbf36b430 (patch)
treeb1ee231e9c97138f6c16c4d5079583f92b268251 /src/control/Pickups.cpp
parentfix (diff)
downloadre3-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.cpp2
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;