diff options
Diffstat (limited to 'src/game/server/gameworld.cpp')
| -rw-r--r-- | src/game/server/gameworld.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/game/server/gameworld.cpp b/src/game/server/gameworld.cpp index 8fffabc8..6444cce5 100644 --- a/src/game/server/gameworld.cpp +++ b/src/game/server/gameworld.cpp @@ -12,7 +12,7 @@ CGameWorld::CGameWorld() { m_pGameServer = 0x0; m_pServer = 0x0; - + m_Paused = false; m_ResetRequested = false; for(int i = 0; i < NUM_ENTTYPES; i++) @@ -164,7 +164,7 @@ void CGameWorld::Tick() pEnt->Tick(); pEnt = m_pNextTraverseEntity; } - + for(int i = 0; i < NUM_ENTTYPES; i++) for(CEntity *pEnt = m_apFirstEntityTypes[i]; pEnt; ) { @@ -191,7 +191,7 @@ CCharacter *CGameWorld::IntersectCharacter(vec2 Pos0, vec2 Pos1, float Radius, v { if(p == pNotThis) continue; - + vec2 IntersectPos = closest_point_on_line(Pos0, Pos1, p->m_Pos); float Len = distance(p->m_Pos, IntersectPos); if(Len < p->m_ProximityRadius+Radius) @@ -205,7 +205,7 @@ CCharacter *CGameWorld::IntersectCharacter(vec2 Pos0, vec2 Pos1, float Radius, v } } } - + return pClosest; } @@ -215,13 +215,13 @@ CCharacter *CGameWorld::ClosestCharacter(vec2 Pos, float Radius, CEntity *pNotTh // Find other players float ClosestRange = Radius*2; CCharacter *pClosest = 0; - + CCharacter *p = (CCharacter *)GameServer()->m_World.FindFirst(ENTTYPE_CHARACTER); for(; p; p = (CCharacter *)p->TypeNext()) { if(p == pNotThis) continue; - + float Len = distance(Pos, p->m_Pos); if(Len < p->m_ProximityRadius+Radius) { @@ -232,6 +232,6 @@ CCharacter *CGameWorld::ClosestCharacter(vec2 Pos, float Radius, CEntity *pNotTh } } } - + return pClosest; } |