about summary refs log tree commit diff
path: root/src/game/server/entity.cpp
diff options
context:
space:
mode:
authorMarius "Teelevision" Neugebauer <marius@teele.eu>2014-05-07 19:02:55 +0200
committerMarius "Teelevision" Neugebauer <marius@teele.eu>2014-05-07 19:02:55 +0200
commit25c71282cf26948001a9d01678f97ccc07ae138e (patch)
treed3dfad81f217e4111ad32f1752def4ba23775289 /src/game/server/entity.cpp
parentb03f30f8b472aaede4ca4923ab55419890e433c7 (diff)
downloadzcatch-25c71282cf26948001a9d01678f97ccc07ae138e.tar.gz
zcatch-25c71282cf26948001a9d01678f97ccc07ae138e.zip
improved spam protection (now you can kill everyone you have on hook)
Diffstat (limited to 'src/game/server/entity.cpp')
-rw-r--r--src/game/server/entity.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/game/server/entity.cpp b/src/game/server/entity.cpp
index 3fae22f2..7c2a97e8 100644
--- a/src/game/server/entity.cpp
+++ b/src/game/server/entity.cpp
@@ -55,11 +55,11 @@ bool CEntity::GameLayerClipped(vec2 CheckPos)
 			round(CheckPos.y)/32 < -200 || round(CheckPos.y)/32 > GameServer()->Collision()->GetHeight()+200 ? true : false;
 }
 
-void CEntity::SetCharactersNearby()
+void CEntity::InitAffectedCharacters()
 {
 	CCharacter *c;
 	for(int i = 0; i < MAX_CLIENTS; ++i)
 		if((c = GameServer()->GetPlayerChar(i)))
-			m_CharactersNearby[i] = (absolute(c->m_Pos.x - m_Pos.x) <= 900.0f && absolute(c->m_Pos.y - m_Pos.y) <= 700.0f && distance(c->m_Pos, m_Pos) <= 900.0f);
-	m_CharactersNearbyInitialized = true;
+			m_AffectedCharacters[i] = (absolute(c->m_Pos.x - m_Pos.x) <= 900.0f && absolute(c->m_Pos.y - m_Pos.y) <= 700.0f && distance(c->m_Pos, m_Pos) <= 900.0f);
+	m_AffectedCharactersInitialized = true;
 }