From: Rudolf Polzer Date: Wed, 27 Jul 2011 15:58:14 +0000 (+0200) Subject: MinstaGib: invisibility powerups disables waypointsprites X-Git-Tag: xonotic-v0.5.0~148^2~38 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=3773f5b12cbc8ad446ba0ff3ab5e4ae767163ce1;p=xonotic%2Fxonotic-data.pk3dir.git MinstaGib: invisibility powerups disables waypointsprites (except to your own team) --- diff --git a/qcsrc/server/waypointsprites.qc b/qcsrc/server/waypointsprites.qc index 836a85357..b5b6a0beb 100644 --- a/qcsrc/server/waypointsprites.qc +++ b/qcsrc/server/waypointsprites.qc @@ -214,6 +214,23 @@ float WaypointSprite_Customize() if(e.classname == "spectator") e = e.enemy; + // as a GENERAL rule: + // if you have the invisibility powerup, sprites ALWAYS are restricted to your team + // but only apply this to real players, not to spectators + if(g_minstagib && (self.owner.items & IT_STRENGTH) && (e == other)) + { + if(teamplay) + { + if(self.owner.team != e.team) + return FALSE; + } + else + { + if(self.owner != e) + return FALSE; + } + } + return self.waypointsprite_visible_for_player(e); }