]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Merge branch 'master' into z411/bai-server
authorz411 <z411@omaera.org>
Sat, 23 Apr 2022 21:04:45 +0000 (17:04 -0400)
committerz411 <z411@omaera.org>
Sat, 23 Apr 2022 21:04:45 +0000 (17:04 -0400)
1  2 
qcsrc/client/announcer.qc
qcsrc/client/hud/panel/centerprint.qc
qcsrc/client/hud/panel/centerprint.qh
qcsrc/client/main.qc
qcsrc/server/client.qc
qcsrc/server/command/vote.qc
qcsrc/server/teamplay.qc
qcsrc/server/world.qc

index 5c7a7d58985c16b62695667cb0815a20a40be6fc,e86702afa086a8314ee12ba92540f605929a6b7d..7ff4602b2ab2c110376f35179b84fd3269b68d84
@@@ -154,13 -149,10 +153,13 @@@ void Announcer_Gamestart(
                                if (gametype.m_1v1)
                                        Announcer_Duel();
                                else
-                                       centerprint_SetTitle(strcat("^BG", MapInfo_Type_ToText(gametype)), 0); // Show game type as title
+                                       centerprint_SetTitle(strcat("^BG", MapInfo_Type_ToText(gametype))); // Show game type as title
  
                                if(time + 5.0 < startTime) // if connecting to server while restart was active don't always play prepareforbattle
 -                                      Local_Notification(MSG_ANNCE, ANNCE_PREPARE);
 +                                      if(teamplay)
 +                                              Local_Notification(MSG_ANNCE, ANNCE_PREPARE_TEAM);
 +                                      else
 +                                              Local_Notification(MSG_ANNCE, ANNCE_PREPARE);
                        }
  
                        announcer_countdown.nextthink = startTime - floor(startTime - time + 0.5); //synchronize nextthink to startTime
index 391cb5364f9804d5f23ccb4008d819fbcfc8ab9b,1436f2ef6a9d48e8675976e190ee76c542847329..7688d3b57c0bb93dba97c45719ddda712cd4b8b0
@@@ -45,12 -45,9 +45,13 @@@ float centerprint_expire_time[CENTERPRI
  int centerprint_countdown_num[CENTERPRINT_MAX_MSGS];
  bool centerprint_showing;
  
 +float centerprint_medal_expire_time;
 +string centerprint_medal_icon;
 +float centerprint_medal_times;
 +
  string centerprint_title;
- float centerprint_title_offset;
+ string centerprint_title_left;
+ string centerprint_title_right;
  
  void centerprint_Add(int new_id, string strMessage, float duration, int countdown_num)
  {
@@@ -154,33 -151,24 +155,39 @@@ void centerprint_KillAll(
        }
  }
  
- void centerprint_ClearTitle()
 +void centerprint_Medal(string icon, float times)
 +{
 +      if(!autocvar_hud_panel_centerprint_medals) return;
 +
 +      //LOG_INFOF("centerprint_Medal: icon: %s times: %d", icon, times);
 +      //centerprint_medal_expire_time = time + autocvar_hud_panel_centerprint_time;
 +      centerprint_medal_expire_time = time + MSG_MEDAL_TIME;
 +      centerprint_medal_times = times;
 +      if(centerprint_medal_icon)
 +              strunzone(centerprint_medal_icon);
 +      centerprint_medal_icon = strzone(strcat("gfx/medal/", icon));
 +
 +      centerprint_showing = true;
 +}
 +
+ void centerprint_SetDuelTitle(string left, string right, string div)
  {
-       strfree(centerprint_title);
-       centerprint_title_offset = 0;
+       strcpy(centerprint_title_left, left);
+       strcpy(centerprint_title_right, right);
+       centerprint_SetTitle(sprintf("^BG%s^BG  %s  %s", left, div, right));
  }
  
- void centerprint_SetTitle(string title, float offset)
+ void centerprint_SetTitle(string title)
  {
-       if(title != centerprint_title) {
+       if(title != centerprint_title)
                strcpy(centerprint_title, CCR(title));
-               centerprint_title_offset = offset;
-       }
+ }
+ void centerprint_ClearTitle()
+ {
+       strfree(centerprint_title);
+       strfree(centerprint_title_left);
+       strfree(centerprint_title_right);
  }
  
  float hud_configure_cp_generation_time;
index 7a75f45cee4a2f33f721ebd01b2ac09751260dfc,02a046a6a140015eae8167254f1ff670e2354854..a3e419ba8a4d0a29d287bdf6fb593ce5ab148f81
@@@ -26,6 -23,6 +26,7 @@@ void centerprint_AddStandard(string str
  void centerprint_Kill(int id);
  void centerprint_KillAll();
  
+ void centerprint_SetDuelTitle(string left, string right, string div);
+ void centerprint_SetTitle(string title);
  void centerprint_ClearTitle();
- void centerprint_SetTitle(string title, float offset);
 +void centerprint_Medal(string icon, int times);
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge