mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 01:58:19 +00:00
flag position is only sent when player is near
This commit is contained in:
parent
a270396d10
commit
335aa0feb2
|
@ -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;
|
||||
|
||||
|
|
Loading…
Reference in a new issue