flag position is only sent when player is near

This commit is contained in:
Alfred Eriksson 2009-01-17 17:26:56 +00:00
parent a270396d10
commit 335aa0feb2

View file

@ -215,8 +215,11 @@ void FLAG::reset()
void FLAG::snap(int snapping_client)
{
NETOBJ_FLAG *flag = (NETOBJ_FLAG *)snap_new_item(NETOBJTYPE_FLAG, team, sizeof(NETOBJ_FLAG));
flag->x = (int)pos.x;
flag->y = (int)pos.y;
if(!networkclipped(snapping_client, pos))
{
flag->x = (int)pos.x;
flag->y = (int)pos.y;
}
flag->team = team;
flag->carried_by = -1;