From: Rudolf Polzer Date: Wed, 29 Dec 2010 20:00:39 +0000 (+0100) Subject: restrict waypointsprite pings to 3 per second X-Git-Tag: xonotic-v0.5.0~330^2~7 X-Git-Url: https://de.git.xonotic.org/?a=commitdiff_plain;h=a9346e8446de20a1c6059396f3ec936c31c58316;p=xonotic%2Fxonotic-data.pk3dir.git restrict waypointsprite pings to 3 per second --- diff --git a/qcsrc/server/waypointsprites.qc b/qcsrc/server/waypointsprites.qc index 5bbf02676..bda0e77b8 100644 --- a/qcsrc/server/waypointsprites.qc +++ b/qcsrc/server/waypointsprites.qc @@ -81,8 +81,13 @@ void WaypointSprite_UpdateTeamRadar(entity e, float icon, vector col) e.SendFlags |= 32; } +.float waypointsprite_pingtime; void WaypointSprite_Ping(entity e) { + // anti spam + if(time < e.waypointsprite_pingtime) + return; + e.waypointsprite_pingtime = time + 0.3; // ALWAYS sends (this causes a radar circle), thus no check e.cnt |= 0x80; e.SendFlags |= 32;