]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
MinstaGib: invisibility powerups disables waypointsprites
authorRudolf Polzer <divverent@xonotic.org>
Wed, 27 Jul 2011 15:58:14 +0000 (17:58 +0200)
committerRudolf Polzer <divverent@xonotic.org>
Wed, 27 Jul 2011 16:00:23 +0000 (18:00 +0200)
(except to your own team)

qcsrc/server/waypointsprites.qc

index 836a853570bef941b74612a13d03d84e2d774cfc..b5b6a0beb377bf3b26922c8431c02e5af172ac5d 100644 (file)
@@ -214,6 +214,23 @@ float WaypointSprite_Customize()
        if(e.classname == "spectator")
                e = e.enemy;
 
        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);
 }
 
        return self.waypointsprite_visible_for_player(e);
 }