]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Added full hostname
authorz411 <z411@omaera.org>
Sat, 5 Sep 2020 19:00:36 +0000 (15:00 -0400)
committerz411 <z411@omaera.org>
Sat, 5 Sep 2020 19:00:36 +0000 (15:00 -0400)
qcsrc/client/hud/panel/scoreboard.qc
qcsrc/client/main.qc
qcsrc/client/main.qh
qcsrc/server/autocvars.qh
qcsrc/server/client.qc

index a0c5a337e53e2d42c836dabb4482058f50f9cce5..023a33d7a580fc341ae58e49a84bc5bafbe8d798 100644 (file)
@@ -1635,7 +1635,7 @@ void Scoreboard_Draw()
        pos.y += sb_gameinfo_type_fontsize.y;
        
        // z411 servername
-       drawcolorcodedstring(pos + '0.5 0 0' * (panel_size.x - stringwidth(hostname, true, sb_gameinfo_detail_fontsize)), hostname, sb_gameinfo_detail_fontsize, panel_fg_alpha, DRAWFLAG_NORMAL);
+       drawcolorcodedstring(pos + '0.5 0 0' * (panel_size.x - stringwidth(hostname_full, true, sb_gameinfo_detail_fontsize)), hostname_full, sb_gameinfo_detail_fontsize, panel_fg_alpha, DRAWFLAG_NORMAL);
        
        pos.y += sb_gameinfo_detail_fontsize.y;
        
index 8ac1a067cc5e9ae1a63d52fef7485aafd901fbd5..e140fb5ec495b657ff0a78a9d4fd6aafe2236f11 100644 (file)
@@ -921,7 +921,7 @@ NET_HANDLE(ENT_CLIENT_INIT, bool isnew)
 
        g_trueaim_minrange = ReadCoord();
        
-       strcpy(hostname, ReadString());
+       strcpy(hostname_full, ReadString());
 
        return = true;
 
index 95df48074042ae387c58727c52e0afbfb3da0163..70b952d9e3137b10b93cb6393f8802323d303544 100644 (file)
@@ -4,7 +4,7 @@
 #include <common/weapons/_all.qh>
 
 // z411
-string hostname;
+string hostname_full;
 
 // Map coordinate base calculations need these
 vector mi_center;
index e96c67b47bad3546bad0f461756d2765297e54ca..f2482b9dbc080e3bbfdd054edf1cceae711213a5 100644 (file)
@@ -263,6 +263,7 @@ float autocvar_gameversion;
 float autocvar_gameversion_min;
 float autocvar_gameversion_max;
 string autocvar_hostname;
+string autocvar_hostname_full; // z411
 bool autocvar_lastlevel;
 //int autocvar_leadlimit;
 int autocvar_leadlimit_and_fraglimit;
index 33df8ab98d8841c21b4db07e45ec4a875855ab33..ea18ed47949e9c5e9f10e399520598e1a012a026 100644 (file)
@@ -875,8 +875,8 @@ void ClientInit_misc(entity this)
        WriteByte(channel, serverflags);
        WriteCoord(channel, autocvar_g_trueaim_minrange);
        
-       // z411 send hostname
-       WriteString(channel, autocvar_hostname);
+       // z411 send full hostname
+       WriteString(channel, (autocvar_hostname_full ? autocvar_hostname_full : autocvar_hostname));
 }
 
 void ClientInit_CheckUpdate(entity this)
@@ -1064,7 +1064,7 @@ string getwelcomemessage(entity this)
        modifications = substring(modifications, 2, strlen(modifications) - 2);
 
        string versionmessage = GetClientVersionMessage(this);
-       string s = strcat(versionmessage, "^8\n^8\nhost is ^9", autocvar_hostname, "^8\n");
+       string s = strcat(versionmessage, "^8\n^8\nhost is ^9", (autocvar_hostname_full ? autocvar_hostname_full : autocvar_hostname), "^8\n");
 
        s = strcat(s, "^8\nmatch type is ^1", gamemode_name, "^8\n");