]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Added permanent MOTD
authorz411 <z411@omaera.org>
Sat, 17 Apr 2021 23:11:53 +0000 (19:11 -0400)
committerz411 <z411@omaera.org>
Sat, 17 Apr 2021 23:27:36 +0000 (19:27 -0400)
qcsrc/client/hud/panel/infomessages.qc
qcsrc/client/main.qc
qcsrc/client/main.qh
qcsrc/server/client.qc
qcsrc/server/client.qh
qcsrc/server/world.qc

index 56b6869c63ec2603d32ef4368ecab5d0fe135e83..3e0d46379e6c8126f4b207a66ca82fb95d856b47 100644 (file)
@@ -11,7 +11,7 @@ void HUD_InfoMessages_Export(int fh)
        HUD_Write_Cvar("hud_panel_infomessages_flip");
 }
 
-float autocvar_hud_panel_infomessages_group0 = 1;
+//float autocvar_hud_panel_infomessages_group0 = 1;
 float autocvar_hud_panel_infomessages_group_fadetime = 0.4;
 float autocvar_hud_panel_infomessages_group_time = 6;
 const int IMG_COUNT = 1; // number of InfoMessage Groups
@@ -94,7 +94,7 @@ void HUD_InfoMessages()
                                s = sprintf(_("^1Spectating: ^7%s"), entcs_GetName(current_player));
                        InfoMessage(s);*/
 
-                       if(autocvar_hud_panel_infomessages_group0)
+                       /*if(autocvar_hud_panel_infomessages_group0)
                        {
                                img_curr_group = 0;
                                switch(img_select(img_curr_group) % 3)
@@ -117,7 +117,7 @@ void HUD_InfoMessages()
                                                break;
                                }
                                InfoMessage(s);
-                       }
+                       }*/
 
                        //bool mutator_returnvalue = MUTATOR_CALLHOOK(DrawInfoMessages, pos, mySize, img_curr_group);
                        //pos = M_ARGV(0, vector);
@@ -219,6 +219,9 @@ void HUD_InfoMessages()
                }
 
                // z411
+               if (motd_permanent != "")
+                       InfoMessage(motd_permanent);
+               
                MUTATOR_CALLHOOK(DrawInfoMessages, pos, mySize, img_curr_group);
        }
        else
index 668d0d27d3396c75e2a057e9131b4a24e843918a..06fc1dede583ded319287c038296f38514042f2b 100644 (file)
@@ -1062,6 +1062,7 @@ NET_HANDLE(ENT_CLIENT_INIT, bool isnew)
        g_trueaim_minrange = ReadCoord();
        
        strcpy(hostname_full, ReadString());
+       strcpy(motd_permanent, ReadString());
 
        return = true;
 
index 90fc6b63694bc794b0719268ac578c9c5c1b460b..1820fe369fe9841f61ef143c106720ef23d95fc7 100644 (file)
@@ -6,6 +6,7 @@
 
 // z411
 string hostname_full;
+string motd_permanent;
 
 bool autocvar_cl_db_saveasdump;
 bool autocvar_cl_spawn_event_particles;
index 288193e6e926fdfb28efb72f133f929b876fe452..468c03c9876ce195c5d7b612cecb15e3098087e2 100644 (file)
@@ -889,7 +889,8 @@ void ClientInit_misc(entity this)
        WriteCoord(channel, autocvar_g_trueaim_minrange);
        
        // z411 send full hostname
-       WriteString(channel, (autocvar_hostname_full ? autocvar_hostname_full : autocvar_hostname));
+       WriteString(channel, autocvar_hostname_full);
+       WriteString(channel, autocvar_sv_motd_permanent);
 }
 
 void ClientInit_CheckUpdate(entity this)
index bf9dbf9ec40eaa1afdd86230f3572ccace361b54..29b3029c475c1757159cad9adaafc1740776aaf6 100644 (file)
@@ -46,6 +46,7 @@ float autocvar_gameversion_max;
 string autocvar_hostname;
 int autocvar_spawn_debug;
 string autocvar_sv_motd;
+string autocvar_sv_motd_permanent;
 int autocvar_sv_name_maxlength = 64;
 bool autocvar_sv_servermodelsonly;
 int autocvar_sv_spectate;
index 53f61aeb4f310304e11cc07bdb01a5dfc86e3a0f..18dd29a8b2ac7ff110df1a59fcfb7a613c5e2520 100644 (file)
@@ -320,6 +320,7 @@ void cvar_changes_init()
                BADCVAR("g_maplist");
                BADCVAR("g_maplist_mostrecent");
                BADCVAR("sv_motd");
+               BADCVAR("sv_motd_permanent");
                
                BADPREFIX("g_teamnames_");