diff options
Diffstat (limited to 'src/control/Pickups.cpp')
-rw-r--r-- | src/control/Pickups.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/control/Pickups.cpp b/src/control/Pickups.cpp index 7e7ef321..e53f1ecb 100644 --- a/src/control/Pickups.cpp +++ b/src/control/Pickups.cpp @@ -1412,6 +1412,20 @@ CPickups::DetonateMinesHitByGunShot(CVector *vec1, CVector *vec2) } void +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 (Distance(center, aPickUps[i].m_vecPos) < radius) { + aPickUps[i].GetRidOfObjects(); + aPickUps[i].m_bRemoved = true; + aPickUps[i].m_eType = PICKUP_NONE; + } + } + } +} + +void CPickups::Load(uint8 *buf, uint32 size) { INITSAVEBUF |