diff options
| author | oy <Tom_Adams@web.de> | 2011-04-13 20:37:12 +0200 |
|---|---|---|
| committer | oy <Tom_Adams@web.de> | 2011-04-13 20:37:12 +0200 |
| commit | 06115dd49dca2f8eb5f14606437e8fd20037cc4d (patch) | |
| tree | 5ec4bca6158319b3f5285d7689c5f94ae8da8c93 /src/game/server/gameworld.cpp | |
| parent | 63e059b8fff6498e42b765a1dca000e53005ea77 (diff) | |
| download | zcatch-06115dd49dca2f8eb5f14606437e8fd20037cc4d.tar.gz zcatch-06115dd49dca2f8eb5f14606437e8fd20037cc4d.zip | |
added "Whitespace and line Endings cleanup" by GreYFoX
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; } |