about summary refs log tree commit diff
path: root/src/game/server/entities/pickup.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/game/server/entities/pickup.cpp')
-rw-r--r--src/game/server/entities/pickup.cpp9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/game/server/entities/pickup.cpp b/src/game/server/entities/pickup.cpp
index a2c6f650..136e3efe 100644
--- a/src/game/server/entities/pickup.cpp
+++ b/src/game/server/entities/pickup.cpp
@@ -5,7 +5,7 @@
 #include "pickup.h"
 
 CPickup::CPickup(CGameWorld *pGameWorld, int Type, int SubType)
-: CEntity(pGameWorld, NETOBJTYPE_PICKUP)
+: CEntity(pGameWorld, CGameWorld::ENTTYPE_PICKUP)
 {
 	m_Type = Type;
 	m_Subtype = SubType;
@@ -91,12 +91,9 @@ void CPickup::Tick()
 					RespawnTime = g_pData->m_aPickups[m_Type].m_Respawntime;
 
 					// loop through all players, setting their emotes
-					CEntity *apEnts[64];
-					int Num = GameServer()->m_World.FindEntities(vec2(0, 0), 1000000, apEnts, 64, NETOBJTYPE_CHARACTER);
-					
-					for (int i = 0; i < Num; ++i)
+					CCharacter *pC = static_cast<CCharacter *>(GameServer()->m_World.FindFirst(CGameWorld::ENTTYPE_CHARACTER));
+					for(; pC; pC = (CCharacter *)pC->TypeNext())
 					{
-						CCharacter *pC = static_cast<CCharacter *>(apEnts[i]);
 						if (pC != pChr)
 							pC->SetEmote(EMOTE_SURPRISE, Server()->Tick() + Server()->TickSpeed());
 					}