about summary refs log tree commit diff
path: root/src/game/server/entities
diff options
context:
space:
mode:
authoroy <Tom_Adams@web.de>2011-03-04 17:08:10 +0100
committeroy <Tom_Adams@web.de>2011-03-04 17:08:10 +0100
commit9811c2396baa86e3401caef295649eaf3e12a4a5 (patch)
tree15232e5f180a844e8702f6ef99cd97e9e55a6365 /src/game/server/entities
parent4bede550be18cfc9bb4df669c147032917160066 (diff)
downloadzcatch-9811c2396baa86e3401caef295649eaf3e12a4a5.tar.gz
zcatch-9811c2396baa86e3401caef295649eaf3e12a4a5.zip
made network clip flags. Closes #131
Diffstat (limited to 'src/game/server/entities')
-rw-r--r--src/game/server/entities/flag.cpp9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/game/server/entities/flag.cpp b/src/game/server/entities/flag.cpp
index 13109b07..5ac3de47 100644
--- a/src/game/server/entities/flag.cpp
+++ b/src/game/server/entities/flag.cpp
@@ -25,6 +25,9 @@ void CFlag::Reset()
 
 void CFlag::Snap(int SnappingClient)
 {
+	if(NetworkClipped(SnappingClient))
+		return;
+
 	CNetObj_Flag *pFlag = (CNetObj_Flag *)Server()->SnapNewItem(NETOBJTYPE_FLAG, m_Team, sizeof(CNetObj_Flag));
 	if(!pFlag)
 		return;
@@ -32,10 +35,4 @@ void CFlag::Snap(int SnappingClient)
 	pFlag->m_X = (int)m_Pos.x;
 	pFlag->m_Y = (int)m_Pos.y;
 	pFlag->m_Team = m_Team;
-	pFlag->m_CarriedBy = -1;
-	
-	if(m_AtStand)
-		pFlag->m_CarriedBy = -2;
-	else if(m_pCarryingCharacter && m_pCarryingCharacter->GetPlayer())
-		pFlag->m_CarriedBy = m_pCarryingCharacter->GetPlayer()->GetCID();
 }