]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/miscfunctions.qc
Merge branch 'Mario/bd_tweak' into 'master'
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / miscfunctions.qc
index a546a6714d3b9afd441bad4a46d0c59b28316beb..14457679f15c2ab98ba0319046b751d775eb1dd7 100644 (file)
@@ -33,7 +33,7 @@
 
 void crosshair_trace(entity pl)
 {
-       traceline_antilag(pl, pl.cursor_trace_start, pl.cursor_trace_start + normalize(pl.cursor_trace_endpos - pl.cursor_trace_start) * MAX_SHOT_DISTANCE, MOVE_NORMAL, pl, ANTILAG_LATENCY(pl));
+       traceline_antilag(pl, pl.cursor_trace_start, pl.cursor_trace_start + normalize(pl.cursor_trace_endpos - pl.cursor_trace_start) * max_shot_distance, MOVE_NORMAL, pl, ANTILAG_LATENCY(pl));
 }
 .bool ctrace_solidchanged;
 void crosshair_trace_plusvisibletriggers(entity pl)
@@ -57,7 +57,7 @@ void crosshair_trace_plusvisibletriggers(entity pl)
 }
 void WarpZone_crosshair_trace(entity pl)
 {
-       WarpZone_traceline_antilag(pl, pl.cursor_trace_start, pl.cursor_trace_start + normalize(pl.cursor_trace_endpos - pl.cursor_trace_start) * MAX_SHOT_DISTANCE, MOVE_NORMAL, pl, ANTILAG_LATENCY(pl));
+       WarpZone_traceline_antilag(pl, pl.cursor_trace_start, pl.cursor_trace_start + normalize(pl.cursor_trace_endpos - pl.cursor_trace_start) * max_shot_distance, MOVE_NORMAL, pl, ANTILAG_LATENCY(pl));
 }
 
 
@@ -476,16 +476,16 @@ void GetCvars(entity this, int f)
 }
 
 // decolorizes and team colors the player name when needed
-string playername(entity p)
+string playername(entity p, bool team_colorize)
 {
     string t;
-    if (teamplay && !gameover && IS_PLAYER(p))
+    if (team_colorize && teamplay && !intermission_running && IS_PLAYER(p))
     {
         t = Team_ColorCode(p.team);
         return strcat(t, strdecolorize(p.netname));
     }
     else
-        return p.netname;
+        return ColorTranslateRGB(p.netname);
 }
 
 float want_weapon(entity weaponinfo, float allguns) // WEAPONTODO: what still needs done?