]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/waypointsprites.qc
Merge branch 'master' into Mario/monsters
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / waypointsprites.qc
index 0e62df7cb2cd029a8cd0aa5d183e63f135c1e948..a5817fa502addef565a946eaaa55a7bd544f60ff 100644 (file)
@@ -197,7 +197,7 @@ float WaypointSprite_visible_for_player(entity e)
        {
                if(self.team != e.team)
                        return FALSE;
-               if(e.classname != "player")
+               if not(IS_PLAYER(e))
                        return FALSE;
        }
 
@@ -206,7 +206,7 @@ float WaypointSprite_visible_for_player(entity e)
 
 entity WaypointSprite_getviewentity(entity e)
 {
-       if(e.classname == "spectator")
+       if(IS_SPEC(e))
                e = e.enemy;
        /* TODO idea (check this breaks nothing)
        else if(e.classname == "observer")
@@ -238,14 +238,8 @@ float WaypointSprite_Customize()
        entity e;
        e = WaypointSprite_getviewentity(other);
 
-       // 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(!WaypointSprite_isteammate(self.owner, e))
-                       return FALSE;
-       }
+       if(MUTATOR_CALLHOOK(CustomizeWaypoint))
+               return FALSE;
 
        return self.waypointsprite_visible_for_player(e);
 }
@@ -259,7 +253,7 @@ float WaypointSprite_SendEntity(entity to, float sendflags)
        sendflags = sendflags & 0x7F;
        
        if(g_nexball)
-               sendflags &~= 0x80;
+               sendflags &= ~0x80;
        else if(self.max_health || (self.pain_finished && (time < self.pain_finished + 0.25)))
                sendflags |= 0x80;