]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
join queue: (also) display infomessage when queued to switch teams TODO bones_was_here/queue_stuff
authorbones_was_here <bones_was_here@xonotic.au>
Sat, 10 May 2025 11:42:58 +0000 (21:42 +1000)
committerbones_was_here <bones_was_here@xonotic.au>
Tue, 13 May 2025 08:27:08 +0000 (18:27 +1000)
TODO: scoreboard, after k9er/handicap-features merge

qcsrc/client/hud/panel/infomessages.qc

index 2774d64983b31eec4325821072f0014c74ac0831..e22c4d723d04aff1768a975896992a03afedbb3d 100644 (file)
@@ -86,6 +86,8 @@ void HUD_InfoMessages()
        int img_curr_group = -1;
        if(!autocvar__hud_configure)
        {
+               int wants_join = warmup_stage ? 0 : entcs_GetWantsJoin(current_player);
+
                if(spectatee_status)
                {
                        if(spectatee_status == -1)
@@ -125,21 +127,17 @@ void HUD_InfoMessages()
                        pos = M_ARGV(0, vector);
                        img_curr_group = M_ARGV(2, int);
 
-                       if(!mutator_returnvalue)
-                       {
-                               int tm = entcs_GetWantsJoin(current_player);
-                               if(tm > 0)
-                               {
-                                       tm = Team_IndexToTeam(tm);
-                                       s = sprintf(_("^2You're queued to join the %s%s^2 team"), Team_ColorCode(tm), Team_ColorName(tm));
-                               }
-                               else if (tm < 0)
-                                       s = sprintf(_("^2You're queued to join any available team"));
-                               else
-                                       s = sprintf(_("^1Press ^3%s^1 to join"), getcommandkey(_("jump"), "+jump"));
-                               InfoMessage(s);
-                       }
+                       if(!mutator_returnvalue && !wants_join)
+                               InfoMessage(sprintf(_("^1Press ^3%s^1 to join"), getcommandkey(_("jump"), "+jump")));
+               }
+
+               if(wants_join > 0)
+               {
+                       wants_join = Team_IndexToTeam(wants_join);
+                       InfoMessage(sprintf(_("^2You're queued to join the %s%s^2 team"), Team_ColorCode(wants_join), Team_ColorName(wants_join)));
                }
+               else if (wants_join < 0)
+                       InfoMessage(sprintf(_("^2You're queued to join any available team")));
 
                if (time < STAT(GAMESTARTTIME))
                {