Fix pickup fix :P

This commit is contained in:
Sergeanur 2020-10-17 15:33:22 +03:00
parent ca64a49af1
commit 516a02d2da

View File

@ -745,7 +745,7 @@ void
CPickups::DoMineEffects(CEntity *entity) CPickups::DoMineEffects(CEntity *entity)
{ {
const CVector &pos = entity->GetPosition(); const CVector &pos = entity->GetPosition();
float dist = Distance2D(pos, TheCamera.GetPosition()); float dist = Distance(pos, TheCamera.GetPosition());
const float MAXDIST = 20.0f; const float MAXDIST = 20.0f;
if (dist < MAXDIST) { if (dist < MAXDIST) {
@ -764,7 +764,7 @@ void
CPickups::DoMoneyEffects(CEntity *entity) CPickups::DoMoneyEffects(CEntity *entity)
{ {
const CVector &pos = entity->GetPosition(); const CVector &pos = entity->GetPosition();
float dist = Distance2D(pos, TheCamera.GetPosition()); float dist = Distance(pos, TheCamera.GetPosition());
const float MAXDIST = 20.0f; const float MAXDIST = 20.0f;
if (dist < MAXDIST) { if (dist < MAXDIST) {
@ -783,7 +783,7 @@ void
CPickups::DoCollectableEffects(CEntity *entity) CPickups::DoCollectableEffects(CEntity *entity)
{ {
const CVector &pos = entity->GetPosition(); const CVector &pos = entity->GetPosition();
float dist = Distance2D(pos, TheCamera.GetPosition()); float dist = Distance(pos, TheCamera.GetPosition());
const float MAXDIST = 14.0f; const float MAXDIST = 14.0f;
if (dist < MAXDIST) { if (dist < MAXDIST) {