1 /* (c) Magnus Auvinen. See licence.txt in the root of the distribution for more information. */
2 /* If you are missing that file, acquire a complete release at teeworlds.com. */
3 #include <game/server/gamecontext.h>
6 CFlag::CFlag(CGameWorld
*pGameWorld
, int Team
)
7 : CEntity(pGameWorld
, CGameWorld::ENTTYPE_FLAG
)
10 m_ProximityRadius
= ms_PhysSize
;
11 m_pCarryingCharacter
= NULL
;
19 m_pCarryingCharacter
= NULL
;
26 void CFlag::Snap(int SnappingClient
)
28 if(NetworkClipped(SnappingClient
))
31 CNetObj_Flag
*pFlag
= (CNetObj_Flag
*)Server()->SnapNewItem(NETOBJTYPE_FLAG
, m_Team
, sizeof(CNetObj_Flag
));
35 pFlag
->m_X
= (int)m_Pos
.x
;
36 pFlag
->m_Y
= (int)m_Pos
.y
;
37 pFlag
->m_Team
= m_Team
;