]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Revert "Show to spectators all the waypoints that are shown to spectated players...
authorterencehill <piuntn@gmail.com>
Fri, 30 Dec 2016 16:48:05 +0000 (17:48 +0100)
committerterencehill <piuntn@gmail.com>
Fri, 30 Dec 2016 16:48:05 +0000 (17:48 +0100)
This reverts commit 8802dc71a56bfe87db766c6dab331046575f7eb9.

qcsrc/common/mutators/mutator/waypoints/waypointsprites.qc
qcsrc/common/turrets/cl_turrets.qc

index bcb317b4abe305562183dfd2456c51e994d93acf..bdedf295d8b7e31a967b0b9b1f4a51248618d589 100644 (file)
@@ -475,13 +475,13 @@ void Draw_WaypointSprite(entity this)
 
     InterpolateOrigin_Do(this);
 
+    float t = entcs_GetTeam(player_localnum) + 1;
     string spriteimage = "";
 
     // choose the sprite
     switch (this.rule)
     {
         case SPRITERULE_SPECTATOR:
-            float t = entcs_GetTeam(player_localnum) + 1;
             if (!(
                 (autocvar_g_waypointsprite_itemstime == 1 && t == NUM_SPECTATOR + 1)
             || (autocvar_g_waypointsprite_itemstime == 2 && (t == NUM_SPECTATOR + 1 || warmup_stage || STAT(ITEMSTIME) == 2))
@@ -492,7 +492,7 @@ void Draw_WaypointSprite(entity this)
         case SPRITERULE_DEFAULT:
             if (this.team)
             {
-                if (this.team == myteam + 1)
+                if (this.team == t)
                     spriteimage = this.netname;
                 else
                     spriteimage = "";
@@ -501,9 +501,9 @@ void Draw_WaypointSprite(entity this)
                 spriteimage = this.netname;
             break;
         case SPRITERULE_TEAMPLAY:
-            if (myteam == NUM_SPECTATOR)
+            if (t == NUM_SPECTATOR + 1)
                 spriteimage = this.netname3;
-            else if (this.team == myteam + 1)
+            else if (this.team == t)
                 spriteimage = this.netname2;
             else
                 spriteimage = this.netname;
@@ -613,7 +613,7 @@ void Draw_WaypointSprite(entity this)
 
     float crosshairdistance = sqrt( pow(o.x - vid_conwidth/2, 2) + pow(o.y - vid_conheight/2, 2) );
 
-    float t = waypointsprite_scale;
+    t = waypointsprite_scale;
     a *= waypointsprite_alpha;
 
     {
index 48c6a8798981269b18d83e41c1351f0b23d41640..c21e327d4470655336e6033d1823587c65f6e458 100644 (file)
@@ -67,12 +67,13 @@ void turret_draw2d(entity this)
                return;
 
        float dist = vlen(this.origin - view_origin);
+       float t = (entcs_GetTeam(player_localnum) + 1);
 
        vector o;
        string txt;
 
        if(autocvar_cl_vehicles_hud_tactical)
-       if(dist < 10240 && (myteam + 1 != this.team))
+       if(dist < 10240 && t != this.team)
        {
                // TODO: Vehicle tactical hud
                o = project_3d_to_2d(this.origin + '0 0 32');
@@ -120,7 +121,7 @@ void turret_draw2d(entity this)
        else
                txt = spritelookuptext(this, spriteimage);
 
-       if(time - floor(time) > 0.5 && (myteam + 1 == this.team))
+       if(time - floor(time) > 0.5 && t == this.team)
        {
                if(this.helpme && time < this.helpme)
                {
@@ -162,7 +163,7 @@ void turret_draw2d(entity this)
 
        float crosshairdistance = sqrt( pow(o.x - vid_conwidth/2, 2) + pow(o.y - vid_conheight/2, 2) );
 
-       float t = waypointsprite_scale;
+       t = waypointsprite_scale;
        a *= waypointsprite_alpha;
 
        {