]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Merge branch 'master' into z411/bai-server
authorz411 <z411@omaera.org>
Fri, 8 Apr 2022 23:09:06 +0000 (19:09 -0400)
committerz411 <z411@omaera.org>
Fri, 8 Apr 2022 23:09:06 +0000 (19:09 -0400)
35 files changed:
1  2 
balance-xdf.cfg
commands.cfg
gamemodes-server.cfg
notifications.cfg
qcsrc/client/announcer.qc
qcsrc/client/hud/panel/centerprint.qc
qcsrc/client/hud/panel/centerprint.qh
qcsrc/client/hud/panel/timer.qc
qcsrc/client/main.qc
qcsrc/client/main.qh
qcsrc/client/view.qc
qcsrc/common/ent_cs.qc
qcsrc/common/gamemodes/gamemode/_mod.inc
qcsrc/common/gamemodes/gamemode/_mod.qh
qcsrc/common/mapinfo.qh
qcsrc/common/net_linked.qh
qcsrc/common/notifications/all.inc
qcsrc/common/notifications/all.qh
qcsrc/common/stats.qh
qcsrc/menu/xonotic/util.qc
qcsrc/server/client.qc
qcsrc/server/client.qh
qcsrc/server/command/cmd.qc
qcsrc/server/command/common.qc
qcsrc/server/command/sv_cmd.qc
qcsrc/server/command/vote.qc
qcsrc/server/command/vote.qh
qcsrc/server/damage.qc
qcsrc/server/damage.qh
qcsrc/server/items/items.qc
qcsrc/server/mutators/events.qh
qcsrc/server/round_handler.qc
qcsrc/server/scores.qc
qcsrc/server/world.qc
qcsrc/server/world.qh

diff --cc balance-xdf.cfg
Simple merge
diff --cc commands.cfg
Simple merge
Simple merge
Simple merge
index 41c8ecf5b29b116e39ea906226ec8231683132f1,6a211246f3047bba3b7c49e5f394cebe571f706e..79f7adf01216519b477f6daff3ece069ba800b0d
@@@ -113,26 -105,25 +109,28 @@@ void Announcer_Gamestart(
                                setthink(announcer_countdown, Announcer_Countdown);
                        }
  
-                       // z411 set title
-                       if(time < STAT(GAMESTARTTIME) && !warmup_stage) {
-                               if(gametype == MAPINFO_TYPE_DUEL) {
+                       if(!warmup_stage && time < STAT(GAMESTARTTIME))
+                       {
+                               if (gametype.m_1v1)
+                               {
                                        entity pl1 = players.sort_next;
                                        entity pl2 = pl1.sort_next;
-                                       
-                                       centerprint_SetTitle(strcat(entcs_GetName(pl1.sv_entnum), " vs ", entcs_GetName(pl2.sv_entnum)));
-                               } else {
-                                       centerprint_SetTitle(MapInfo_Type_ToText(gametype));
+                                       string pl1_name = (pl1 && pl1.team != NUM_SPECTATOR ? entcs_GetName(pl1.sv_entnum) : "???");
+                                       string pl2_name = (pl2 && pl2.team != NUM_SPECTATOR ? entcs_GetName(pl2.sv_entnum) : "???");
+                                       float offset = stringwidth(pl2_name, true, hud_fontsize) - stringwidth(pl1_name, true, hud_fontsize) - 1;
+                                       centerprint_SetTitle(sprintf("^BG%s^BG%s%s", pl1_name, _("  vs  "), pl2_name), offset / 2); // Show duelers in 1v1 game mode
                                }
-                       }
-                       
-                       if(time + 5.0 < startTime) // if connecting to server while restart was active don't always play prepareforbattle
-                       if(time > announcer_countdown.nextthink && !warmup_stage && time < STAT(GAMESTARTTIME)) { // don't play it again if countdown was already going
-                               if(teamplay)
-                                       Local_Notification(MSG_ANNCE, ANNCE_PREPARE_TEAM);
                                else
-                                       Local_Notification(MSG_ANNCE, ANNCE_PREPARE);
+                                       centerprint_SetTitle(strcat("^BG", MapInfo_Type_ToText(gametype)), 0); // 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 16d8c8b0c43bd32cb4014d51b1329b2a663f51f4,5a18bf388a4422cc60439a6c1642330b3849ca31..25e2815125c0adec6f3dc752f1572eff9f51d72a
@@@ -43,43 -45,8 +45,12 @@@ float centerprint_expire_time[CENTERPRI
  int centerprint_countdown_num[CENTERPRINT_MAX_MSGS];
  bool centerprint_showing;
  
- bool centerprint_title_show;
 +float centerprint_medal_expire_time;
 +string centerprint_medal_icon;
 +float centerprint_medal_times;
 +
  string centerprint_title;
- void centerprint_ClearTitle()
- {
-       centerprint_title = string_null;
-       centerprint_title_show = false;
- }
- void centerprint_SetTitle(string title)
- {
-       if(title != centerprint_title) {
-               if(centerprint_title)
-                       strunzone(centerprint_title);
-               centerprint_title = strzone(title);
-               
-               centerprint_title_show = true;
-       }
- }
- 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;
- }
+ float centerprint_title_offset;
  
  void centerprint_Add(int new_id, string strMessage, float duration, int countdown_num)
  {
@@@ -184,6 -149,23 +153,35 @@@ void centerprint_KillAll(
        }
  }
  
 -              if(centerprint_title)
 -                      strfree(centerprint_title);
 -
 -              centerprint_title = strzone(CCR(title));
++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_ClearTitle()
+ {
+       strfree(centerprint_title);
+       centerprint_title_offset = 0;
+ }
+ void centerprint_SetTitle(string title, float offset)
+ {
+       if(title != centerprint_title) {
++              strcpy(centerprint_title, CCR(title));
+               centerprint_title_offset = offset;
+       }
+ }
  float hud_configure_cp_generation_time;
  void HUD_CenterPrint()
  {
        bool all_messages_expired = true;
  
        pos = panel_pos;
-       height = vid_conheight/50 * 4;
-       pos.y -= height;
++
+       if (autocvar_hud_panel_centerprint_flip)
+               pos.y += panel_size.y;
+       align = bound(0, autocvar_hud_panel_centerprint_align, 1);
 +      
 +      // z411 draw medals first
 +      if (autocvar_hud_panel_centerprint_medals && time < centerprint_medal_expire_time) {
++              float height = vid_conheight/50 * 4;
++              pos.y -= height;
++
 +              if(time < centerprint_medal_expire_time - MSG_MEDAL_FADE_TIME)
 +                      a = 1;
 +              else
 +                      a = (centerprint_medal_expire_time - time) / MSG_MEDAL_FADE_TIME;
 +              
 +              vector tmp_in = pos;
 +                      
-               mysize = draw_getimagesize(centerprint_medal_icon);
-               newsize = vec2(height*(mysize.x/mysize.y), height);
-               fontsize = '1 1 0' * (newsize.y/2);
++              vector mysize = draw_getimagesize(centerprint_medal_icon);
++              vector newsize = vec2(height*(mysize.x/mysize.y), height);
++              vector fontsize = '1 1 0' * (newsize.y/2);
 +              
 +              tmp_in.x += (panel_size.x - newsize.x) / 2; // center medal icon
 +              
 +              if(centerprint_medal_times < autocvar_hud_panel_centerprint_medals_max) {
 +                      tmp_in.x -= ((newsize.x * 1.1) * (centerprint_medal_times - 1) / 2);
 +                      for(int t = 0; t < centerprint_medal_times; t++) {
 +                              drawpic(tmp_in, centerprint_medal_icon, newsize, '1 1 1', a, DRAWFLAG_NORMAL);
 +                              tmp_in.x += newsize.x * 1.1;
 +                      }
 +              } else {
 +                      drawpic(tmp_in, centerprint_medal_icon, newsize, '1 1 1', a, DRAWFLAG_NORMAL);
 +                      tmp_in.x += newsize.x + fontsize.x * 0.25; // draw times next to it
 +                      tmp_in.y += (newsize.y - fontsize.y) / 2;
 +                      drawstring(tmp_in, ftos(centerprint_medal_times), fontsize, '1 1 1', a, DRAWFLAG_NORMAL);
 +              }
++
++              pos.y += height;
 +              
 +              all_messages_expired = false;
 +      }
-       
-       // continue with normal procedure
-       pos.y += height;
-       
-       // z411 title
-       if(centerprint_title_show) {
-               fontsize = '1 1 0' * vid_conheight/50 * autocvar_hud_panel_centerprint_fontscale * 1.5;
-               drawcolorcodedstring(pos + '0.5 0 0' * (panel_size.x - stringwidth(centerprint_title, true, fontsize)), centerprint_title, fontsize, 1, DRAWFLAG_NORMAL);
-               pos.y += fontsize.y + (fontsize.y / 4);
-               
+       // Show title if available
+       if(centerprint_title) {
+               vector fontsize = cp_fontsize * autocvar_hud_panel_centerprint_fontscale_title;
+               float width = stringwidth(centerprint_title, true, fontsize);
+               pos.x = panel_pos.x + (panel_size.x - width) * align;
+               if (autocvar_hud_panel_centerprint_flip)
+                       pos.y -= fontsize.y;
+               if (centerprint_title_offset && align == 0.5)
+                       pos.x += centerprint_title_offset * CENTERPRINT_BASE_SIZE * autocvar_hud_panel_centerprint_fontscale_title;
+               drawcolorcodedstring(pos, centerprint_title, fontsize, 1, DRAWFLAG_NORMAL);
+               if (autocvar_hud_panel_centerprint_flip)
+                       pos.y -= cp_fontsize.y * CENTERPRINT_TITLE_SPACING;
+               else
+                       pos.y += fontsize.y + (hud_fontsize.y * CENTERPRINT_TITLE_SPACING);
+               drawfill(pos, vec2(width, 1), '1 1 1', 1, DRAWFLAG_NORMAL);
+               if (autocvar_hud_panel_centerprint_flip)
+                       pos.y -= cp_fontsize.y * CENTERPRINT_TITLE_SPACING;
+               else
+                       pos.y += cp_fontsize.y * CENTERPRINT_TITLE_SPACING;
                all_messages_expired = false;
        }
-       
-       // continue with normal procedure this time
-       
-       if (autocvar_hud_panel_centerprint_flip)
-               pos.y += panel_size.y;
-       align = bound(0, autocvar_hud_panel_centerprint_align, 1);
        for (g=0, i=0, j=cpm_index; i<CENTERPRINT_MAX_MSGS; ++i, ++j)
        {
-               bool is_bold = centerprint_bold[j];
-               // entries = bound(1, floor(CENTERPRINT_MAX_ENTRIES * 4 * panel_size_y/panel_size_x), CENTERPRINT_MAX_ENTRIES);
-               // height = panel_size_y/entries;
-               // fontsize = '1 1 0' * height;
-               height = (is_bold) ? vid_conheight/50 * autocvar_hud_panel_centerprint_fontscale_bold : vid_conheight/50 * autocvar_hud_panel_centerprint_fontscale;
-               fontsize = '1 1 0' * height;
-               entries = bound(1, floor(panel_size.y/height), CENTERPRINT_MAX_ENTRIES);
                if (j == CENTERPRINT_MAX_MSGS)
                        j = 0;
                if (centerprint_expire_time[j] == -1)
index 1a1ce172df7ed69ffe7f281b8c209dd2d5d83af3,b1d52cf0adc06d4e14be1e837ac4f1ecd7dd7a41..73a2808223a4526c98d4030651051a66763fee4c
@@@ -3,29 -3,25 +3,29 @@@
  
  bool autocvar_hud_panel_centerprint;
  float autocvar_hud_panel_centerprint_align;
- //float autocvar_hud_panel_centerprint_fade_in = 0.15;
 -float autocvar_hud_panel_centerprint_fade_in = 0.15;
++float autocvar_hud_panel_centerprint_fade_in = 0;
  float autocvar_hud_panel_centerprint_fade_out = 0.15;
  float autocvar_hud_panel_centerprint_fade_subsequent = 1;
  float autocvar_hud_panel_centerprint_fade_subsequent_passone = 3;
  float autocvar_hud_panel_centerprint_fade_subsequent_passone_minalpha = 0.5;
  float autocvar_hud_panel_centerprint_fade_subsequent_passtwo = 10;
  float autocvar_hud_panel_centerprint_fade_subsequent_passtwo_minalpha = 0.5;
- //float autocvar_hud_panel_centerprint_fade_subsequent_minfontsize = 0.75;
- //float autocvar_hud_panel_centerprint_fade_minfontsize = 0;
+ float autocvar_hud_panel_centerprint_fade_minfontsize = 1;
  bool autocvar_hud_panel_centerprint_flip;
- float autocvar_hud_panel_centerprint_fontscale;
+ float autocvar_hud_panel_centerprint_fontscale = 1;
  float autocvar_hud_panel_centerprint_fontscale_bold = 1.4;
- bool autocvar_hud_panel_centerprint_dynamichud  = true;
+ float autocvar_hud_panel_centerprint_fontscale_title = 1.8;
+ bool autocvar_hud_panel_centerprint_dynamichud = true;
  float autocvar_hud_panel_centerprint_time;
  
- void centerprint_ClearTitle();
- void centerprint_SetTitle(string title);
- void centerprint_Medal(string icon, int times);
 +bool autocvar_hud_panel_centerprint_medals = true;
 +int autocvar_hud_panel_centerprint_medals_max = 5;
 +
  void centerprint_Add(int new_id, string strMessage, float duration, int countdown_num);
  void centerprint_AddStandard(string strMessage);
  void centerprint_Kill(int id);
  void centerprint_KillAll();
+ void centerprint_ClearTitle();
+ void centerprint_SetTitle(string title, float offset);
++void centerprint_Medal(string icon, int times);
index 7613347b62e134e00b8a75e87872465af1eb57b1,68e7312c7a5ba881ee1f45a000e91f64219ea7fb..51095ae1a8ed4673c4c267fe3e141d8109f2a497
@@@ -38,98 -61,101 +63,124 @@@ void HUD_Timer(
                mySize -= '2 2 0' * panel_bg_padding;
        }
  
-       string timer_sub = "";
-       float timelimit, timeleft, minutesLeft, overtimes, timeout_last;
-       timelimit = STAT(TIMELIMIT);
-       overtimes = STAT(OVERTIMESADDED);
-       timeout_last = STAT(TIMEOUT_LAST);
+       string timer;
+       string subtimer = string_null;
+       string subtext = string_null;
+       float curtime, timelimit, timeleft;
+       vector timer_size, subtext_size, subtimer_size;
+       vector timer_color = '1 1 1';
+       vector subtimer_color = '1 1 1';
+       bool swap = (autocvar_hud_panel_timer_secondary == 2 && STAT(ROUNDSTARTTIME));
++      float timeout_last = STAT(TIMEOUT_LAST);
+       // Use real or frozen time and get the time limit
 -      curtime = (intermission_time ? intermission_time : time);
++      if(intermission_time)
++              curtime = intermission_time;
++      else if(timeout_last)
++              curtime = timeout_last;
++      else
++              curtime = time;
 +
-       if (autocvar_hud_panel_timer_unbound){
-               timeleft = max(0, timelimit * 60 + STAT(GAMESTARTTIME) - time);
-       } else {
-               timeleft = bound(0, timelimit * 60 + STAT(GAMESTARTTIME) - time, timelimit * 60);
+       if(warmup_stage)
+       {
+               timelimit = STAT(WARMUP_TIMELIMIT);
+               if(timelimit == 0)
+                       timelimit = STAT(TIMELIMIT) * 60;
+       }
+       else
+       {
+               timelimit = STAT(TIMELIMIT) * 60;
        }
-       timeleft = ceil(timeleft);
+       // Calculate time left
+       timeleft = HUD_Timer_TimeLeft(curtime, STAT(GAMESTARTTIME), timelimit);
+       // Timer color
+       if(!intermission_time && !warmup_stage && timelimit > 0)
+               timer_color = HUD_Timer_Color(timeleft);
  
-       if(countdown_type && !warmup_stage && timeleft > 0 && timeleft != last_timeleft && timeleft <= 10)
 +      // countdown sound
 +      // if 3 use server dictated option, otherwise the client's
 +      int countdown_type;
 +      if(autocvar_cl_timer_countdown == 3)
 +              countdown_type = sv_timer_countdown;
 +      else
 +              countdown_type = autocvar_cl_timer_countdown;
 +      
-       minutesLeft = floor(timeleft / 60);
++      if(countdown_type && !warmup_stage && timeleft > 0 && timeleft != last_timeleft && timeleft <= 10 && !intermission_time)
 +      {
 +              if(countdown_type == 1 || (countdown_type == 2 && spectatee_status))
 +                      sound(NULL, CH_INFO, SND_ENDCOUNT, VOL_BASE, ATTN_NONE);
 +              
 +              last_timeleft = timeleft;
 +      }
 +
+       // Timer text
+       if (autocvar_hud_panel_timer_increment || timelimit <= 0)
+               timer = seconds_tostring(HUD_Timer_TimeElapsed(curtime, STAT(GAMESTARTTIME)));
+       else
+               timer = seconds_tostring(timeleft);
  
-       float warmup_timeleft = 0;
-       if(warmup_stage)
+       // Secondary timer for round-based game modes
+       if(STAT(ROUNDSTARTTIME) && autocvar_hud_panel_timer_secondary)
        {
-               float warmup_timelimit = STAT(WARMUP_TIMELIMIT);
-               if(warmup_timelimit > 0)
-                       warmup_timeleft = max(0, warmup_timelimit - time + STAT(GAMESTARTTIME));
-               else if(warmup_timelimit == 0)
-                       warmup_timeleft = timeleft;
-               warmup_timeleft = ceil(warmup_timeleft);
-       }
+               if(STAT(ROUNDSTARTTIME) == -1) {
+                       // Round can't start
+                       subtimer = "--:--";
+                       subtimer_color = '1 0 0';
+               } else {
+                       float round_curtime, round_timelimit, round_timeleft;
  
-       vector timer_color;
-       if(intermission_time || minutesLeft >= 5 || warmup_stage || timelimit == 0)
-               timer_color = '1 1 1'; //white
-       else if(minutesLeft >= 1)
-               timer_color = '1 1 0'; //yellow
-       else
-               timer_color = '1 0 0'; //red
-       if (intermission_time) {
-               timer = max(0, floor(intermission_time - STAT(GAMESTARTTIME)));
-               timer_sub = "Intermission";
-       } else if (timeout_last) {
-               if(autocvar_hud_panel_timer_increment)
-                       timer = max(0, floor(timeout_last - STAT(GAMESTARTTIME)));
-               else
-                       timer = ceil(max(0, timelimit * 60 + STAT(GAMESTARTTIME) - timeout_last));
-               timer_sub = "Timeout";
-       } else if (autocvar_hud_panel_timer_increment || timelimit == 0) {
-               // Time elapsed timer
-               if((warmup_stage && warmup_timeleft <= 0) || time < STAT(GAMESTARTTIME))
-                       timer = 0;
-               else
-                       timer = floor(time - STAT(GAMESTARTTIME));
-       } else {
-               // Time left timer
-               if(warmup_stage) {
-                       if(warmup_timeleft <= 0)
-                               timer = floor(timelimit * 60);
+                       // Use real or frozen time and get the time limit
+                       round_curtime = (game_stopped_time ? game_stopped_time : time);
+                       round_timelimit = STAT(ROUND_TIMELIMIT);
+                       // Calculate time left
+                       round_timeleft = HUD_Timer_TimeLeft(round_curtime, STAT(ROUNDSTARTTIME), round_timelimit);
+                       // Subtimer color
+                       if(!intermission_time && round_timelimit > 0)
+                               subtimer_color = HUD_Timer_Color(round_timeleft);
+                       // Subtimer text
+                       if (autocvar_hud_panel_timer_increment || round_timelimit <= 0)
+                               subtimer = seconds_tostring(HUD_Timer_TimeElapsed(round_curtime, STAT(ROUNDSTARTTIME)));
                        else
-                               timer = warmup_timeleft;
-               } else {
-                       timer = timeleft;
+                               subtimer = seconds_tostring(round_timeleft);
                }
        }
-       
-       if(warmup_stage)
-               timer_sub = "Warmup";
+       // Subtext
+       int overtimes = STAT(OVERTIMES);
+       if(warmup_stage || autocvar__hud_configure)
+               subtext = _("Warmup");
+       else if(STAT(TIMEOUT_STATUS) == 2)
+               subtext = _("Timeout");
+       else if (overtimes == -1)
+               subtext = _("Sudden Death");
        else if(overtimes == 1)
-               timer_sub = "Overtime";
-       else if (overtimes > 1)
-               timer_sub = sprintf("Overtime #%d", overtimes);
-       
-       drawstring_aspect(pos, seconds_tostring(timer), mySize, timer_color, panel_fg_alpha, DRAWFLAG_NORMAL);
-       
-       if(timer_sub != "") {
-               pos.y += mySize.y;
-               mySize.y = mySize.y / 2;
-               drawstring_aspect(pos, timer_sub, mySize, '1 0 0', panel_fg_alpha, DRAWFLAG_NORMAL);
+               subtext = _("Overtime");
+       else if (overtimes >= 2)
+               subtext = sprintf(_("Overtime #%d"), overtimes);
+       subtext_size  = vec2(mySize.x, mySize.y / 3);
+       timer_size    = vec2(mySize.x, mySize.y - subtext_size.y);
+       subtimer_size = vec2(mySize.x / 3, mySize.y - subtext_size.y);
+       panel_size.y -= subtext_size.y;
+       HUD_Panel_DrawBg();
+       if(subtimer) {
+               float subtimer_padding = subtimer_size.y / 5;
+               timer_size.x -= subtimer_size.x;
+               drawstring_aspect(pos + eX * timer_size.x + eY * subtimer_padding, (swap ? timer : subtimer), subtimer_size - eY * subtimer_padding * 2, (swap ? timer_color : subtimer_color), panel_fg_alpha, DRAWFLAG_NORMAL);
        }
  
+       drawstring_aspect(pos, (swap ? subtimer : timer), timer_size, (swap ? subtimer_color : timer_color), panel_fg_alpha, DRAWFLAG_NORMAL);
+       if(subtext)
+               drawstring_aspect(pos + eY * timer_size.y, subtext, subtext_size, '0 1 0', panel_fg_alpha, DRAWFLAG_NORMAL);
        draw_endBoldFont();
  }
Simple merge
Simple merge
Simple merge
index 06d9440ad548bcc0334cfd0b7f61f8f472b55079,5366371458fe52fadb86e3c2d7fc3dd8b2ca44db..a87c2764e5d75c850508d5e903d73bb583f0833e
@@@ -165,17 -157,6 +165,17 @@@ ENTCS_PROP(SOLID, true, sv_solid, solid
        { WriteByte(chan, ent.sv_solid); },
        { ent.sv_solid = ReadByte(); })
  
- ENTCS_PROP(MMM_STATUS, true, mmm_status, mmm_status, ENTCS_SET_NORMAL,
-       { WriteShort(chan, ent.mmm_status); },
-       { ent.mmm_status = ReadShort(); })
 +// z411 weapon
 +ENTCS_PROP(ACTIVEWEPID, false, activewepid, activewepid, ENTCS_SET_NORMAL,
 +      { WriteByte(chan, ent.activewepid); },
 +      { ent.activewepid = ReadByte(); })
 +
 +//LegendGuard adds ENTCS_PROP for MMM 20-02-2021
 +// gamemode specific player mmm status (independent of score and frags)
++//ENTCS_PROP(MMM_STATUS, true, mmm_status, mmm_status, ENTCS_SET_NORMAL,
++//    { WriteShort(chan, ent.mmm_status); },
++//    { ent.mmm_status = ReadShort(); })
 +
  #ifdef SVQC
  
        int ENTCS_PUBLICMASK = 0, ENTCS_PRIVATEMASK = 0;
index 96ba25f11f044a0260c8e1bef6114eabfd53df0c,a33ec87a01a34a5a8406f57aa3c3d52829cf3994..0d8f0f395db97f9ef57b298c25cc2cb7193b1333
@@@ -12,8 -12,6 +12,8 @@@
  #include <common/gamemodes/gamemode/keepaway/_mod.inc>
  #include <common/gamemodes/gamemode/keyhunt/_mod.inc>
  #include <common/gamemodes/gamemode/lms/_mod.inc>
- #include <common/gamemodes/gamemode/mmm/_mod.inc> //LegendGuard adds _mod.inc for Murder in Megaerebus Manor 20-02-2021
++//#include <common/gamemodes/gamemode/mmm/_mod.inc>
 +#include <common/gamemodes/gamemode/mayhem/_mod.inc>
  #include <common/gamemodes/gamemode/nexball/_mod.inc>
  #include <common/gamemodes/gamemode/onslaught/_mod.inc>
  #include <common/gamemodes/gamemode/race/_mod.inc>
index 25c9c119d02b761c0abbf6518beed5930a2381ca,ffd71d59d3f1092453b6d83f8048003693dfa531..9cffae953f6e9e84e175810afac69cc194fcac4d
@@@ -12,8 -12,6 +12,8 @@@
  #include <common/gamemodes/gamemode/keepaway/_mod.qh>
  #include <common/gamemodes/gamemode/keyhunt/_mod.qh>
  #include <common/gamemodes/gamemode/lms/_mod.qh>
- #include <common/gamemodes/gamemode/mmm/_mod.qh> //LegendGuard adds _mod.qh for Murder in Megaerebus Manor 20-02-2021
++//#include <common/gamemodes/gamemode/mmm/_mod.qh>
 +#include <common/gamemodes/gamemode/mayhem/_mod.qh>
  #include <common/gamemodes/gamemode/nexball/_mod.qh>
  #include <common/gamemodes/gamemode/onslaught/_mod.qh>
  #include <common/gamemodes/gamemode/race/_mod.qh>
Simple merge
index e8e32cc06d50ad267f7d605ce82cd1b6b8febcc5,e1586c2034cd867b4a02d3e4fe995d8b3786d15a..a3429bf3291f83e5f4cfe37f2c2ccb65709f5e5d
@@@ -5,13 -5,9 +5,14 @@@ REGISTER_NET_TEMP(TE_CSQC_RACE
  REGISTER_NET_TEMP(TE_CSQC_TEAMNAGGER)
  REGISTER_NET_TEMP(TE_CSQC_PINGPLREPORT)
  REGISTER_NET_TEMP(TE_CSQC_WEAPONCOMPLAIN)
+ REGISTER_NET_TEMP(TE_CSQC_SERVERWELCOME)
  REGISTER_NET_TEMP(TE_CSQC_VEHICLESETUP)
  
 +REGISTER_NET_TEMP(TE_CSQC_TEAMNAMES)
 +REGISTER_NET_TEMP(TE_CSQC_CHATSOUND)
 +REGISTER_NET_TEMP(TE_CSQC_WEAPONPICKUP)
 +REGISTER_NET_TEMP(TE_CSQC_TOTALSHARDS) // for RJZ
 +
  const int RACE_NET_CHECKPOINT_HIT_QUALIFYING = 0; // byte checkpoint, short time, short recordtime, string recordholder
  const int RACE_NET_CHECKPOINT_CLEAR = 1;
  const int RACE_NET_CHECKPOINT_NEXT_QUALIFYING = 2; // byte nextcheckpoint, short recordtime, string recordholder
Simple merge
index e6c0e23ded50a1229c072c4f8d73c4a52a1fc862,45259741b355aa7d703c0e4db40a276abb53be5e..78bbee97797c6247b2e8478d9320a1f2b376d067
@@@ -64,9 -61,7 +64,8 @@@ ENUMCLASS(CPID
        CASE(CPID, LMS)
        CASE(CPID, MISSING_TEAMS)
        CASE(CPID, MISSING_PLAYERS)
 +      CASE(CPID, MISSING_READY)
        CASE(CPID, INSTAGIB_FINDAMMO)
-       CASE(CPID, CAMPAIGN_MESSAGE)
        CASE(CPID, MOTD)
        CASE(CPID, NIX)
        CASE(CPID, ONSLAUGHT)
index 929992ab7fc6c7a74e5f40903ef0fcc73845656a,128f090c4fd9ec94ff1269b3336bda705be60c8e..4ed9b95f67c1ceb71df3122519c4a8563e9abdf4
@@@ -78,14 -78,10 +78,16 @@@ float W_WeaponRateFactor(entity this)
  float game_stopped;
  float game_starttime; //point in time when the countdown to game start is over
  float round_starttime; //point in time when the countdown to round start is over
- float checkrules_overtimesadded; // z411 add
 +float overtime_starttime; // z411 point in time where first overtime started
 +
 +float timeout_last;
 +float timeout_total_time;
 +bool game_timeout;
 +
  int autocvar_leadlimit;
+ int overtimes; // overtimes added (-1 = sudden death)
+ int timeout_status; // (values: 0, 1, 2) contains whether a timeout is not active (0), was called but still at leadtime (1) or is active (2)
  // TODO: world.qh can't be included here due to circular includes!
  #define autocvar_fraglimit cvar("fraglimit")
  #define autocvar_fraglimit_override cvar("fraglimit_override")
@@@ -121,14 -114,14 +123,10 @@@ REGISTER_STAT(VEHICLESTAT_AMMO2, int
  REGISTER_STAT(VEHICLESTAT_RELOAD2, int)
  REGISTER_STAT(VEHICLESTAT_W2MODE, int)
  REGISTER_STAT(NADE_TIMER, float)
- //REGISTER_STAT(SECRETS_TOTAL, int, secrets_total)
- //REGISTER_STAT(SECRETS_FOUND, int, secrets_found)
 -REGISTER_STAT(SECRETS_TOTAL, int, secrets_total)
 -REGISTER_STAT(SECRETS_FOUND, int, secrets_found)
  REGISTER_STAT(RESPAWN_TIME, float)
  REGISTER_STAT(ROUNDSTARTTIME, float, round_starttime)
- REGISTER_STAT(OVERTIMESTARTTIME, float, overtime_starttime)
- REGISTER_STAT(OVERTIMESADDED, float, checkrules_overtimesadded)
- //REGISTER_STAT(MONSTERS_TOTAL, int)
- //REGISTER_STAT(MONSTERS_KILLED, int)
+ REGISTER_STAT(OVERTIMES, int, overtimes)
+ REGISTER_STAT(TIMEOUT_STATUS, int, timeout_status)
 -REGISTER_STAT(MONSTERS_TOTAL, int)
 -REGISTER_STAT(MONSTERS_KILLED, int)
  REGISTER_STAT(NADE_BONUS, float)
  REGISTER_STAT(NADE_BONUS_TYPE, int)
  REGISTER_STAT(NADE_BONUS_SCORE, float)
index 05e8a75b5e674b1778480bb857795e5eed38ef09,691404ac117d183c95162716a60c886d405017cc..6c3711f7478581a704358a057b80d1e48dafb1d3
@@@ -697,8 -688,6 +690,7 @@@ float updateCompression(
        GAMETYPE(MAPINFO_TYPE_ASSAULT) \
        /* GAMETYPE(MAPINFO_TYPE_DUEL) */ \
        /* GAMETYPE(MAPINFO_TYPE_INVASION) */ \
-       GAMETYPE(MAPINFO_TYPE_MMM) \
-       //LegendGuard adds GAMETYPE for menu for MMM 20-02-2021
++      /* GAMETYPE(MAPINFO_TYPE_MMM) */ \
        /**/
  
  // hidden gametypes come last so indexing always works correctly
Simple merge
Simple merge
Simple merge
index 30fe59d3a3477dc327dfdec789f9cbccfca953b5,056a8e9e6ec7dae7efb4356cc4a2cf8b63f047d3..a6f3af3c61e3dc6bf76b6274ec7806fc394f4f01
@@@ -216,22 -209,9 +216,23 @@@ void timeout_handler_think(entity this
                        {
                                Kill_Notification(NOTIF_ALL, NULL, MSG_CENTER, CPID_TIMEIN);
                                timeout_status = TIMEOUT_INACTIVE;
 +                              float total_time = time - timeout_last;
  
                                // reset the slowmo value back to normal
 -                              cvar_set("slowmo", ftos(orig_slowmo));
 +                              // z411 TODO
 +                              //cvar_set("slowmo", ftos(orig_slowmo));
 +                              
 +                              // Disable timeout and fix times
 +                              game_timeout = false;
 +                              timeout_total_time += total_time;
 +                              game_starttime += total_time;
-                               round_starttime += total_time;
++                              if(round_starttime)
++                                      round_starttime += total_time;
 +                              if(round_handler && round_handler_GetEndTime() > 0)
 +                                      round_handler.round_endtime += total_time;
 +
 +                              LOG_INFOF("Timeout lasted %d secs", total_time);
 +                              timeout_last = 0;
  
                                // unlock the view for players so they can move around again
                                FOREACH_CLIENT(IS_PLAYER(it) && IS_REAL_CLIENT(it), {
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
index 9c0431a5248ddef62f408e6c0c9e2ce6798837c3,6c9342b80e30bcb64ec2759cc4a67c245d3bc95f..44757cfd152b4c0bc6b30c53cd455b8d0b871de2
@@@ -46,7 -42,7 +46,8 @@@ void round_handler_Think(entity this
                                this.cnt = 0;
                                this.round_endtime = (this.round_timelimit) ? time + this.round_timelimit : 0;
                                this.nextthink = time;
 +                              FOREACH_CLIENT(IS_PLAYER(it), { roundaccuracy_clear(it); });
+                               rounds_played++;
                                if (this.roundStart) this.roundStart();
                                return;
                        }
Simple merge
Simple merge
Simple merge