From 3f05289328dfaeb67a344de0b553e31cbb11ea36 Mon Sep 17 00:00:00 2001 From: oy Date: Thu, 10 Feb 2011 12:05:55 +0100 Subject: fixed a possible problem with occupied spawn points and cleaned up spawn code a bit --- src/game/server/gameworld.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/game/server/gameworld.cpp') diff --git a/src/game/server/gameworld.cpp b/src/game/server/gameworld.cpp index 66da4369..8fffabc8 100644 --- a/src/game/server/gameworld.cpp +++ b/src/game/server/gameworld.cpp @@ -48,7 +48,8 @@ int CGameWorld::FindEntities(vec2 Pos, float Radius, CEntity **ppEnts, int Max, { if(distance(pEnt->m_Pos, Pos) < Radius+pEnt->m_ProximityRadius) { - ppEnts[Num] = pEnt; + if(ppEnts) + ppEnts[Num] = pEnt; Num++; if(Num == Max) break; -- cgit 1.4.1