]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/client/shownames.qc
Manual riddance of remaining "if not".
[xonotic/xonotic-data.pk3dir.git] / qcsrc / client / shownames.qc
index 5309c555e6085050b6a37b36509cf010964c2deb..a7824a9b75bdcf10647c543d72d8a4fbb62f2c7d 100644 (file)
@@ -19,7 +19,7 @@ void Draw_ShowNames(entity ent)
 #else
        if(ent.sv_entnum == player_localentnum) // ent is me or person i'm spectating
 #endif
-               if not (autocvar_hud_shownames_self && autocvar_chase_active) 
+               if(!(autocvar_hud_shownames_self && autocvar_chase_active))
                        return;
 
        makevectors(view_angles);
@@ -43,7 +43,7 @@ void Draw_ShowNames(entity ent)
                }
 
                // handle tag fading
-               float overlap, onscreen, crosshairdistance;
+               float overlap = FALSE, onscreen, crosshairdistance;
                vector o, eo;
                
                o = project_3d_to_2d(ent.origin);
@@ -57,7 +57,7 @@ void Draw_ShowNames(entity ent)
                                if(e == ent)
                                        continue;
                                eo = project_3d_to_2d(e.origin);
-                               if not(eo_z < 0 || eo_x < 0 || eo_y < 0 || eo_x > vid_conwidth || eo_y > vid_conheight)
+                               if (!(eo_z < 0 || eo_x < 0 || eo_y < 0 || eo_x > vid_conwidth || eo_y > vid_conheight))
                                {
                                        eo_z = 0;
                                        if(vlen((eX * o_x + eY * o_y) - eo) < autocvar_hud_shownames_antioverlap_distance && vlen(ent.origin - view_origin) > vlen(e.origin - view_origin))
@@ -77,7 +77,7 @@ void Draw_ShowNames(entity ent)
                        if(autocvar_hud_shownames_crosshairdistance > crosshairdistance)
                                ent.pointtime = time;
                                
-                       if not(ent.pointtime + autocvar_hud_shownames_crosshairdistance_time > time)
+                       if (!(ent.pointtime + autocvar_hud_shownames_crosshairdistance_time > time))
                                overlap = TRUE;
                        else
                                overlap = (autocvar_hud_shownames_crosshairdistance_antioverlap ? overlap : FALSE); // override what antioverlap says unless allowed by cvar.
@@ -187,7 +187,7 @@ void Draw_ShowNames_All()
        {
                float t;
                t = GetPlayerColor(i);
-               if(t == COLOR_SPECTATOR)
+               if(t == NUM_SPECTATOR)
                        continue;
 
                entity e;
@@ -215,7 +215,7 @@ void Draw_ShowNames_All()
                        e.sameteam = 0;
                }
 
-               e.origin = getplayerorigin(i);
+               setorigin(e, getplayerorigin(i));
                if(e.origin == GETPLAYERORIGIN_ERROR)
                        continue;