]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Merge branch 'master' into z411/bai-server
authorz411 <z411@omaera.org>
Thu, 1 Jun 2023 03:13:06 +0000 (23:13 -0400)
committerz411 <z411@omaera.org>
Thu, 1 Jun 2023 03:13:06 +0000 (23:13 -0400)
57 files changed:
1  2 
commands.cfg
gamemodes-server.cfg
notifications.cfg
qcsrc/client/announcer.qc
qcsrc/client/hud/hud.qh
qcsrc/client/hud/panel/_mod.inc
qcsrc/client/hud/panel/_mod.qh
qcsrc/client/hud/panel/infomessages.qc
qcsrc/client/hud/panel/quickmenu.qc
qcsrc/client/hud/panel/scoreboard.qc
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/ent_cs.qh
qcsrc/common/gamemodes/gamemode/ctf/sv_ctf.qc
qcsrc/common/gamemodes/gamemode/freezetag/sv_freezetag.qc
qcsrc/common/gamemodes/gamemode/freezetag/sv_freezetag.qh
qcsrc/common/items/inventory.qh
qcsrc/common/monsters/sv_monsters.qc
qcsrc/common/mutators/mutator/buffs/sv_buffs.qc
qcsrc/common/mutators/mutator/instagib/sv_instagib.qc
qcsrc/common/mutators/mutator/overkill/oknex.qc
qcsrc/common/net_linked.qh
qcsrc/common/notifications/all.inc
qcsrc/common/notifications/all.qh
qcsrc/common/scores.qh
qcsrc/common/stats.qh
qcsrc/common/util.qc
qcsrc/common/weapons/weapon/devastator.qc
qcsrc/common/weapons/weapon/electro.qc
qcsrc/common/weapons/weapon/mortar.qc
qcsrc/common/weapons/weapon/vaporizer.qc
qcsrc/common/weapons/weapon/vortex.qc
qcsrc/server/.world.qh.kate-swp
qcsrc/server/chat.qc
qcsrc/server/chat.qh
qcsrc/server/client.qc
qcsrc/server/client.qh
qcsrc/server/command/banning.qc
qcsrc/server/command/cmd.qc
qcsrc/server/command/sv_cmd.qc
qcsrc/server/command/vote.qc
qcsrc/server/command/vote.qh
qcsrc/server/damage.qc
qcsrc/server/ipban.qc
qcsrc/server/items/items.qc
qcsrc/server/mutators/events.qh
qcsrc/server/round_handler.qc
qcsrc/server/scores.qc
qcsrc/server/teamplay.qc
qcsrc/server/weapons/tracing.qc
qcsrc/server/weapons/weaponsystem.qc
qcsrc/server/world.qc
qcsrc/server/world.qh
xonotic-server.cfg

diff --cc commands.cfg
Simple merge
index dd57d5b3184ae7e75d012b791d869325b89a456e,01d297e084a27827809150fc6aa2cfd705b9bc7b..113d8c285cfaf3ed80d8d69f5cf69996f615d469
@@@ -613,25 -616,22 +622,44 @@@ set g_duel_not_dm_maps 0 "when this is 
  // ==============================
  //  free for all and team mayhem
  // ==============================
++<<<<<<< HEAD
 +set g_mayhem 0 "Mayhem: Compete for the most damage dealt and frags in this chaotic mayhem!"
 +set g_tmayhem 0 "Team Mayhem: Compete with your team for the most damage dealt and frags in this chaotic mayhem!"
 +
 +set g_mayhem_scoringmethod 1 "1: By default 25% of the score is based on kills and 75% of it is based on damage. 2: 100% frags. 3: 100% damage."
 +set g_tmayhem_scoringmethod 1 "1: By default 25% of the score is based on kills and 75% of it is based on damage. 2: 100% frags. 3: 100% damage."
 +set g_mayhem_scoringmethod_1_damage_weight 0.75 "for the first scoring method how much is damage equal to player's spawning health worth in score"
 +set g_tmayhem_scoringmethod_1_damage_weight 0.75 "for the first scoring method how much is damage equal to player's spawning health worth in score"
 +set g_mayhem_scoringmethod_1_disable_selfdamage2score 0 "disable reducing score with self damage at the cost of full penalty for suicides regardless of how much health was lost suiciding"
 +set g_tmayhem_scoringmethod_1_disable_selfdamage2score 0 "disable reducing score with self damage at the cost of full penalty for suicides regardless of how much health was lost suiciding"
 +set g_mayhem_scoringmethod_1_frag_weight 0.25 "for the first scoring method how much is a frag worth in score"
 +set g_tmayhem_scoringmethod_1_frag_weight 0.25 "for the first scoring method how much is a frag worth in score"
 +
 +set g_mayhem_fraglimit 30 "Team Mayhem basis for how many frags until the match ends, edit this over point_limit preferably"
 +set g_tmayhem_fraglimit 50 "Team Mayhem basis for how many frags until the match ends, edit this over point_limit preferably"
 +
 +set g_mayhem_visual_score_limit 1000 "Mayhem visual score limit overriding the mapinfo specified one"
 +set g_tmayhem_visual_score_limit 1000 "Team Mayhem visual score limit overriding the mapinfo specified one"
 +
 +set g_tmayhem_score_leadlimit -1 "Team Mayhem score lead limit(based on tmayhem_visual_score_limit, not tmayhem_fraglimit) overriding the mapinfo specified one (use 0 to play without limit, and -1 to use the mapinfo's limit)"
++=======
+ set g_mayhem 0 "Mayhem: Compete for the most damage dealt and kills in this chaotic mayhem!"
+ set g_tmayhem 0 "Team Mayhem: Compete with your team for the most damage dealt and kills in this chaotic mayhem!"
+ set g_mayhem_scoring_upscaler 20 "upscale one frag's worth to be this amount of in score"
+ set g_tmayhem_scoring_upscaler 20 "upscale one frag's worth to be this amount of in score"
+ set g_mayhem_scoring_kill_weight 0.25 "how much is a kill worth in frags"
+ set g_tmayhem_scoring_kill_weight 0.25 "how much is a kill worth in frags"
+ set g_mayhem_scoring_damage_weight 0.75 "how much is damage equal to player's spawning health+armor worth in frags"
+ set g_tmayhem_scoring_damage_weight 0.75 "how much is damage equal to player's spawning health+armor worth in frags"
+ set g_mayhem_scoring_disable_selfdamage2score 0 "disable reducing score with self damage at the cost of full penalty for suicides regardless of how much health was lost suiciding"
+ set g_tmayhem_scoring_disable_selfdamage2score 0 "disable reducing score with self damage at the cost of full penalty for suicides regardless of how much health was lost suiciding"
+ set g_mayhem_point_limit -1 "Mayhem score limit overriding the mapinfo specified one (use 0 to play without limit, and -1 to use the mapinfo's limit)"
+ set g_mayhem_point_leadlimit -1 "Mayhem score lead limit overriding the mapinfo specified one (use 0 to play without limit, and -1 to use the mapinfo's limit)"
+ set g_tmayhem_point_limit -1 "Team Mayhem score limit overriding the mapinfo specified one (use 0 to play without limit, and -1 to use the mapinfo's limit)"
+ set g_tmayhem_point_leadlimit -1 "Team Mayhem score lead limit overriding the mapinfo specified one (use 0 to play without limit, and -1 to use the mapinfo's limit)"
++>>>>>>> master
  
  set g_mayhem_weaponarena "most_available" "starting weapons - takes the same options as g_weaponarena"
  set g_tmayhem_weaponarena "most_available" "starting weapons - takes the same options as g_weaponarena"
Simple merge
Simple merge
index 9534b8601ab37de3892d7e83ccff2e30777e016d,312aaea99be3a978b1ca78e996452cea18e5479d..be15ac3ae7982cec440ee85a0e4ee745d6021cf9
@@@ -278,7 -277,7 +280,8 @@@ REGISTER_HUD_PANEL(ITEMSTIME,       HUD
  REGISTER_HUD_PANEL(QUICKMENU,       HUD_QuickMenu,      PANEL_CONFIG_MAIN                        , PANEL_SHOW_MAINGAME | PANEL_SHOW_MINIGAME                                          ) // QUICKMENU
  REGISTER_HUD_PANEL(SCOREBOARD,      Scoreboard_Draw,    PANEL_CONFIG_NO                          , PANEL_SHOW_MAINGAME | PANEL_SHOW_MINIGAME | PANEL_SHOW_MAPVOTE | PANEL_SHOW_WITH_SB) // SCOREBOARD
  REGISTER_HUD_PANEL(STRAFEHUD,       HUD_StrafeHUD,      PANEL_CONFIG_MAIN | PANEL_CONFIG_CANBEOFF, PANEL_SHOW_MAINGAME                                                                ) // STRAFEHUD
+ REGISTER_HUD_PANEL(PICKUP,          HUD_Pickup,         PANEL_CONFIG_MAIN | PANEL_CONFIG_CANBEOFF, PANEL_SHOW_MAINGAME                                                                ) // PICKUP
 +REGISTER_HUD_PANEL(SPECTHUD,        HUD_SpectHUD,       PANEL_CONFIG_NO   | PANEL_CONFIG_CANBEOFF, PANEL_SHOW_MAINGAME                                                                ) // SPECTHUD
  // always add new panels to the end of list
  
  // Because calling lots of functions in QC apparently cuts fps in half on many machines:
Simple merge
Simple merge
index 8147467bdb8c0e8fd07aa3955a6470a933e23a62,0f3425203600cb5be5fedaedb0b45d9bcb32b9af..435ebc537588e9c3e52e3d6907b3feda9252ae75
@@@ -88,15 -102,21 +102,24 @@@ bool QuickMenu_Open(string mode, strin
  
        if(mode == "")
        {
 -              if(file == "" || file == "0")
 -                      mode = "default";
 -              else
 +              if(autocvar__hud_panel_quickmenu_file_from_server)
 +              {
                        mode = "file";
 +                      file = autocvar__hud_panel_quickmenu_file_from_server;
 +              }
 +              else
 +                      mode = "default";
        }
  
+       if(mode == "default")
+       {
+               if (autocvar_hud_panel_quickmenu_server_is_default && autocvar__hud_panel_quickmenu_file_from_server != "")
+               {
+                       mode = "file";
+                       file = autocvar__hud_panel_quickmenu_file_from_server;
+               }
+       }
        if(mode == "file")
        {
                if(file == "" || file == "0")
index 99e1b901a5b9d552ae84421cf39b205dad1e99d4,f8b302b98737ad5a6b65ebf7e7ec94eb59f1a4dc..bca88712daf93cae2b243ce9ac521b824309a708
@@@ -117,11 -106,16 +117,19 @@@ float autocvar_hud_panel_scoreboard_min
  bool autocvar_hud_panel_scoreboard_playerid = false;
  string autocvar_hud_panel_scoreboard_playerid_prefix = "#";
  string autocvar_hud_panel_scoreboard_playerid_suffix = " ";
+ bool autocvar_hud_panel_scoreboard_scores_per_round;
 +int average_ping[NUM_TEAMS];
 +int total_weapons;
 +
  float scoreboard_time;
  
+ SHUTDOWN(scoreboard)
+ {
+       if(autocvar_hud_panel_scoreboard_scores_per_round)
+               cvar_set("hud_panel_scoreboard_scores_per_round", "0");
+ }
  // mode 0: returns translated label
  // mode 1: prints name and description of all the labels
  string Label_getInfo(string label, int mode)
@@@ -731,13 -734,13 +749,13 @@@ void Cmd_Scoreboard_Help(
  // otherwise the previous exclusive rule warns anyway
  // e.g. -teams,rc,cts,lms/kills ?+rc/kills
  #define SCOREBOARD_DEFAULT_COLUMNS \
 -"ping pl fps name |" \
 +"ping pl fps cn name |" \
- " -teams,rc,cts,inv,lms/kills +ft,tdm/kills ?+rc,inv/kills" \
- " -teams,lms/deaths +ft,tdm/deaths" \
+ " -teams,rc,cts,inv,lms/kills +ft,tdm,tmayhem/kills ?+rc,inv/kills" \
+ " -teams,lms/deaths +ft,tdm,tmayhem/deaths" \
  " +tdm/sum" \
- " -teams,lms,rc,cts,inv,ka/suicides +ft,tdm/suicides ?+rc,inv/suicides" \
- " -cts,dm,tdm,ka,ft/frags" /* tdm already has this in "score" */ \
- " +tdm,ft,dom,ons,as/teamkills"\
+ " -teams,lms,rc,cts,inv,ka/suicides +ft,tdm,tmayhem/suicides ?+rc,inv/suicides" \
+ " -cts,dm,tdm,ka,ft,mayhem,tmayhem/frags" /* tdm already has this in "score" */ \
+ " +tdm,ft,dom,ons,as,tmayhem/teamkills"\
  " -rc,cts,nb/dmg -rc,cts,nb/dmgtaken" \
  " +ctf/pickups +ctf/fckills +ctf/returns +ctf/caps +ons/takes +ons/caps" \
  " +lms/lives +lms/rank" \
@@@ -989,36 -981,26 +1007,41 @@@ string Scoreboard_GetName(entity pl
                        sbt_field_icon2_rgb = colormapPaletteColor(f % 16, 1);
                }
        }
 -      return entcs_GetName(pl.sv_entnum);
 +      if(entcs_GetRank(pl.sv_entnum) != "")
 +              return strcat(entcs_GetRank(pl.sv_entnum), "^7 ", entcs_GetName(pl.sv_entnum));
 +      else
 +              return entcs_GetName(pl.sv_entnum);
 +}
 +
 +//LegendGuard adds GetCountrycode function 05-04-2021
 +string Scoreboard_GetCountrycode(entity pl)
 +{
 +      int ccode = entcs_GetCountryCode(pl.sv_entnum);
 +      if(ccode)
 +              sbt_field_icon3 = strcat("gfx/flags/", ftos(ccode));
 +      else
 +              sbt_field_icon3 = strcat("gfx/flags/", ftos(0)); //if user hasn't assigned country flag
 +      
 +      return "";
-       //return ftos(entcs_GetCountryCode(pl.sv_entnum)); //returns a number
  }
  
- vector getPingColor(float f)
- {
-       if(f < 80) {
-               // 20-80 range is green
-               return '0 1 0' + '1 0 1' * max(0, min(60, f-20)) / 60;
-       } else {
-               // 80-300 range is red
-               return '1 1 1' - '0 1 1' * max(0, min(220, f-80)) / 220;
-       }
- }
- string Scoreboard_GetField(entity pl, PlayerScoreField field)
+ int autocvar_hud_panel_scoreboard_ping_best = 0;
+ int autocvar_hud_panel_scoreboard_ping_medium = 70;
+ int autocvar_hud_panel_scoreboard_ping_high = 100;
+ int autocvar_hud_panel_scoreboard_ping_worst = 150;
+ vector autocvar_hud_panel_scoreboard_ping_best_color = '0 1 0';
+ vector autocvar_hud_panel_scoreboard_ping_medium_color = '1 1 0';
+ vector autocvar_hud_panel_scoreboard_ping_high_color = '1 0.5 0';
+ vector autocvar_hud_panel_scoreboard_ping_worst_color = '1 0 0';
+ #define PING_BEST autocvar_hud_panel_scoreboard_ping_best
+ #define PING_MED autocvar_hud_panel_scoreboard_ping_medium
+ #define PING_HIGH autocvar_hud_panel_scoreboard_ping_high
+ #define PING_WORST autocvar_hud_panel_scoreboard_ping_worst
+ #define COLOR_BEST autocvar_hud_panel_scoreboard_ping_best_color
+ #define COLOR_MED autocvar_hud_panel_scoreboard_ping_medium_color
+ #define COLOR_HIGH autocvar_hud_panel_scoreboard_ping_high_color
+ #define COLOR_WORST autocvar_hud_panel_scoreboard_ping_worst_color
+ string Scoreboard_GetField(entity pl, PlayerScoreField field, bool per_round)
  {
        float tmp, num, denom;
        int f;
@@@ -1461,16 -1422,12 +1514,16 @@@ vector Scoreboard_DrawOthers(vector ite
                if(this_team == NUM_SPECTATOR)
                {
                        if(autocvar_hud_panel_scoreboard_spectators_showping)
-                               field = Scoreboard_GetField(pl, SP_PING);
+                               field = Scoreboard_GetField(pl, SP_PING, autocvar_hud_panel_scoreboard_scores_per_round);
                }
                else if(autocvar_hud_panel_scoreboard_others_showscore)
-                       field = Scoreboard_GetField(pl, SP_SCORE);
+                       field = Scoreboard_GetField(pl, SP_SCORE, autocvar_hud_panel_scoreboard_scores_per_round);
  
 -              string str = entcs_GetName(pl.sv_entnum);
 +              string str;
 +              if(entcs_GetRank(pl.sv_entnum) != "")
 +                      str = strcat(entcs_GetRank(pl.sv_entnum), "^7 ", entcs_GetName(pl.sv_entnum));
 +              else
 +                      str = entcs_GetName(pl.sv_entnum);
                if (autocvar_hud_panel_scoreboard_playerid)
                        str = Scoreboard_AddPlayerId(str, pl);
                str = textShortenToWidth(str, namesize, hud_fontsize, stringwidth_colors);
@@@ -2826,10 -2363,12 +2879,13 @@@ void Scoreboard_Draw(
                                str = strcat(str, Scoreboard_Fraglimit_Draw(ll, true));
                        }
                }
 +
                drawcolorcodedstring(pos + '1 0 0' * (panel_size.x - stringwidth(str, true, sb_gameinfo_detail_fontsize)), str, sb_gameinfo_detail_fontsize, panel_fg_alpha, DRAWFLAG_NORMAL); // align right
                // map name and player count
-               str = sprintf(_("^5%d^7/^5%d ^7players"), numplayers, srv_maxplayers ? srv_maxplayers : maxclients);
+               if (campaign)
+                       str = "";
+               else
+                       str = sprintf(_("^5%d^7/^5%d ^7players"), numplayers, srv_maxplayers ? srv_maxplayers : maxclients);
                str = strcat("^7", _("Map:"), " ^2", mi_shortname, "    ", str); // reusing "Map:" translatable string
                drawcolorcodedstring(pos, str, sb_gameinfo_detail_fontsize, panel_fg_alpha, DRAWFLAG_NORMAL); // align left
        }
index ac4cb4c4ca9705db610ee78413b574b8af4f9709,269d12b5edc800f9f2d50df6e7e70faad317bbb2..c5ba1f5266a103dc3bc39412db5823982db7dfc0
@@@ -71,20 -70,10 +72,11 @@@ void HUD_Timer(
        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
-       if(intermission_time)
-               curtime = intermission_time;
-       else if(timeout_last)
-               curtime = timeout_last;
-       else
-               curtime = time;
-       if(warmup_stage)
-               timelimit = STAT(WARMUP_TIMELIMIT);
-       else
-               timelimit = STAT(TIMELIMIT) * 60;
+       curtime = (intermission_time ? intermission_time : time);
+       timelimit = (warmup_stage ? STAT(WARMUP_TIMELIMIT) : STAT(TIMELIMIT) * 60);
  
        // Calculate time left
        timeleft = HUD_Timer_TimeLeft(curtime, STAT(GAMESTARTTIME), timelimit);
        if(!intermission_time && !warmup_stage && timelimit > 0)
                timer_color = HUD_Timer_Color(timeleft);
  
++<<<<<<< HEAD
 +      // 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;
 +      
 +      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 (warmup_stage && timelimit == -1)
-       {
-               // Lock timer in infinite warmup
-               if (autocvar_hud_panel_timer_increment)
-                       timer = 0;
-               else
-                       timer = STAT(TIMELIMIT) * 60;
-       }
+       if (autocvar_hud_panel_timer_increment || timelimit <= 0)
+               timer = HUD_Timer_TimeElapsed(curtime, STAT(GAMESTARTTIME));
        else
-       {
-               if (autocvar_hud_panel_timer_increment || timelimit <= 0)
-                       timer = HUD_Timer_TimeElapsed(curtime, STAT(GAMESTARTTIME));
-               else
-                       timer = timeleft;
-       }
+               timer = timeleft;
  
        // Secondary timer for round-based game modes
        if(STAT(ROUNDSTARTTIME) && autocvar_hud_panel_timer_secondary)
        {
                if(STAT(ROUNDSTARTTIME) == -1) {
                        // Round can't start
-                       subtimer = "--:--";
+                       subtimer_str = "--:--";
                        subtimer_color = '1 0 0';
                } else {
 -                      float round_curtime, round_timelimit, round_timeleft;
 +                      float round_curtime, round_endtime, round_timelimit, round_timeleft;
  
                        // Use real or frozen time and get the time limit
 -                      round_curtime = (game_stopped_time ? game_stopped_time : time);
 +                      round_endtime = STAT(ROUNDENDTIME);
                        round_timelimit = STAT(ROUND_TIMELIMIT);
  
 +                      if(round_endtime)
 +                              round_curtime = round_endtime;
 +                      else if(timeout_last)
 +                              round_curtime = timeout_last;
 +                      else
 +                              round_curtime = time;
 +
                        // Calculate time left
                        round_timeleft = HUD_Timer_TimeLeft(round_curtime, STAT(ROUNDSTARTTIME), round_timelimit);
  
Simple merge
Simple merge
Simple merge
Simple merge
index bd76c6b6b123f7d03044cb0c0898b0cab15f322c,aa689e59d707684eda169334528faf49cce8eefe..a1db8340bb983117c194484dd9306a1b39fbf04d
@@@ -131,20 -130,8 +131,20 @@@ REGISTER_NET_TEMP(CLIENT_ENTCS
        string entcs_GetName(int i)
        {
                entity e = entcs_receiver(i);
-               return ColorTranslateRGB(e ? e.netname : getplayerkeyvalue(i, "name"));
+               return e ? ColorTranslateRGB(e.netname) : "";
        }
 +      
 +      int entcs_GetCountryCode(int i)
 +      {
 +              entity e = entcs_receiver(i);
 +              return e.countrycode;
 +      }
 +      
 +      string entcs_GetRank(int i)
 +      {
 +              entity e = entcs_receiver(i);
 +              return e.rank;
 +      }
  
      /**
       * @param i zero indexed player
index 5ebaea9be9d69c0c38313dae90a93db41566a8fb,118b7079d0c832303ae7aa563172515fea190273..c17f9391abd77ebcae72ebdbdd601edfad957015
@@@ -38,13 -37,9 +38,10 @@@ STATIC_INIT(Inventory
  #endif
  
  #ifdef CSQC
- #include <client/hud/hud.qh>
+ #include <client/hud/panel/pickup.qh>
  
 -Inventory g_inventory;
 +//Inventory g_inventory;
 +Inventory inventoryslots[255];
- float last_pickup_timer;
- entity last_pickup_item;
- int last_pickup_times;
  
  void Inventory_remove(entity this)
  {
@@@ -197,23 -149,23 +183,32 @@@ bool Inventory_customize(entity this, e
  void Inventory_new(PlayerState this)
  {
      Inventory inv = NEW(Inventory);
 -    setcefc(inv, Inventory_customize);
 +    inv.owner = this;
        this.inventory = inv;
 -      inv.owner = this;
 -      Net_LinkEntity(inv, false, 0, Inventory_Send);
 +    
 +    if(!g_duel) {
 +              setcefc(inv, Inventory_customize);
 +              Net_LinkEntity(inv, false, 0, Inventory_Send);
 +      }
  }
  void Inventory_delete(entity e) { delete(e.inventory); }
 -void Inventory_update(entity e) { e.inventory.SendFlags = 0xFFFFFF; }
 +void Inventory_update(entity e)
 +{
 +      if(g_duel)
 +              Inventory_Broadcast(e.inventory);
 +      else
 +              e.inventory.SendFlags = 0xFFFFFF;
 +}
  
+ void Inventory_pickupitem(Pickup this, entity player)
+ {
+       //LOG_DEBUGF("entity %i picked up %s", player, this.m_name);
+       entity store = IS_PLAYER(player) ? PS(player) : player;
+       ++store.inventory.inv_items[this.m_id];
+       Inventory_update(store);
+ }
  void Inventory_clear(entity store)
  {
      // NOTE: you will need to perform Inventory_update after this to update the storage entity
index a0f20195086383b611cf1072c060c06fda4aee4b,7d644fa368c7012d4d761518f3fc65d5029ea387..0fa01b815f830af9c64c9957998d72c741c317b7
  
  void monsters_setstatus(entity this)
  {
 -      STAT(MONSTERS_TOTAL, this) = monsters_total;
 -      STAT(MONSTERS_KILLED, this) = monsters_killed;
 +      //STAT(MONSTERS_TOTAL, this) = monsters_total;
 +      //STAT(MONSTERS_KILLED, this) = monsters_killed;
  }
  
+ bool autocvar_g_monsters_drop = true;
  void monster_dropitem(entity this, entity attacker)
  {
-       if(!this.candrop || !this.monster_loot)
+       if(!this.candrop || !this.monster_loot || !autocvar_g_monsters_drop)
                return;
  
        vector org = CENTER_OR_VIEWOFS(this);
index a3429bf3291f83e5f4cfe37f2c2ccb65709f5e5d,f9e40965b8473282a398fdcedd9dd29c462b8532..79cd6c4fe8bce13852fe633a25ab1a742f2427d6
@@@ -7,12 -7,8 +7,13 @@@ 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_WEAPONPICKUP)
  
 +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
index d2a37fa69f48329402e4499d68be754036353890,effed26d98f90084dd53d1afb8da23e5db5664a5..e21d1ac362524934fedf7c31205aeb727ac6f96f
@@@ -501,11 -422,11 +504,12 @@@ string multiteam_info_sprintf(string in
      MSG_INFO_NOTIF(POWERUP_STRENGTH,                        N_CONSOLE,  1, 0, "s1", "s1",       "strength",       _("^BG%s^K1 picked up Strength"), "")
  
      MSG_INFO_NOTIF(QUIT_DISCONNECT,                         N_CHATCON,  1, 0, "s1", "",         "",             _("^BG%s^F3 disconnected"), "")
 -    MSG_INFO_NOTIF(QUIT_KICK_IDLING,                        N_CHATCON,  1, 1, "s1 f1", "",      "",             _("^BG%s^F3 was kicked after idling for %s seconds"), "")
 -    MSG_INFO_NOTIF(MOVETOSPEC_IDLING,                       N_CHATCON,  1, 1, "s1 f1", "",      "",             _("^BG%s^F3 was moved to^BG spectators^F3 after idling for %s seconds"), "")
 +      MSG_INFO_NOTIF(QUIT_KICK,                               N_CHATCON,  1, 0, "s1", "",         "",             _("^BG%s^F3 was kicked"), "")
 +    MSG_INFO_NOTIF(QUIT_KICK_IDLING,                        N_CHATCON,  1, 0, "s1", "",         "",             _("^BG%s^F3 was kicked for idling"), "")
 +    MSG_INFO_NOTIF(MOVETOSPEC_IDLING,                       N_CHATCON,  1, 0, "s1", "",         "",             _("^BG%s^F3 was moved to spectator for idling"), "")
      MSG_INFO_NOTIF(QUIT_KICK_SPECTATING,                    N_CONSOLE,  0, 0, "", "",           "",             _("^F2You were kicked from the server because you are a spectator and spectators aren't allowed at the moment."), "")
      MSG_INFO_NOTIF(QUIT_KICK_TEAMKILL,                      N_CHATCON,  1, 0, "s1", "",         "",             _("^BG%s^F3 was kicked for excessive teamkilling"), "")
+     MSG_INFO_NOTIF(QUIT_PLAYBAN_TEAMKILL,                   N_CHATCON,  1, 0, "s1", "",         "",             _("^BG%s^F3 was forced to spectate for excessive teamkilling"), "")
      MSG_INFO_NOTIF(QUIT_SPECTATE,                           N_CHATCON,  1, 0, "s1", "",         "",             _("^BG%s^F3 is now^BG spectating"), "")
  
      MSG_INFO_NOTIF(RACE_ABANDONED,                          N_CONSOLE,  1, 0, "s1", "",                                                                     "",                         _("^BG%s^BG has abandoned the race"), "")
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
index 0000000000000000000000000000000000000000,0000000000000000000000000000000000000000..f6ef71ebde280955605d71132e89101aa275dda8
new file mode 100644 (file)
Binary files differ
index 33a2e406f286435fc6cf0997d50f713c36cbc5bd,5a72b59774478a32cf5aacaf046ad4a864ab510b..62307cc15b7fea51f973ac46212bfcc299a3efc4
@@@ -3,7 -3,7 +3,8 @@@
  #include <common/gamemodes/_mod.qh>
  #include <common/mapobjects/target/location.qh>
  #include <common/mapobjects/triggers.qh>
 +#include <common/net_linked.qh>
+ #include <common/notifications/all.qh>
  #include <common/teams.qh>
  #include <common/util.qh>
  #include <common/weapons/weapon.qh>
@@@ -324,11 -351,12 +359,14 @@@ int Say(entity source, int teamsay, ent
                        sprint(source, sourcemsgstr);
                        dedicated_print(msgstr); // send to server console too
                        FOREACH_CLIENT(!(IS_PLAYER(it) || INGAME(it)) && IS_REAL_CLIENT(it) && it != source && !MUTATOR_CALLHOOK(ChatMessageTo, it, source), {
+                               if(IS_REAL_CLIENT(source) && ignore_playerinlist(source, it)) // check ignored players from personal chat log (from "ignore" command)
+                                       continue; // no sending to this player, thank you very much
                                sprint(it, msgstr);
                        });
 -                      event_log_msg = sprintf(":chat_spec:%d:%s", source.playerid, strreplace("\n", " ", msgin));
 +                      
 +                      if(!play_chatsound(source, msgin))
 +                              event_log_msg = sprintf(":chat_spec:%d:%s", source.playerid, strreplace("\n", " ", msgin));
                }
                else
                {
                                MX_Say(strcat(playername(source.netname, source.team, IS_PLAYER(source)), "^7: ", msgin));
                        }
                        FOREACH_CLIENT(IS_REAL_CLIENT(it) && it != source && !MUTATOR_CALLHOOK(ChatMessageTo, it, source), {
+                               if(IS_REAL_CLIENT(source) && ignore_playerinlist(source, it)) // check ignored players from personal chat log (from "ignore" command)
+                                       continue; // no sending to this player, thank you very much
                                sprint(it, msgstr);
                        });
 -                      event_log_msg = sprintf(":chat:%d:%s", source.playerid, strreplace("\n", " ", msgin));
 +                      
 +                      if(!play_chatsound(source, msgin))
 +                              event_log_msg = sprintf(":chat:%d:%s", source.playerid, strreplace("\n", " ", msgin));
                }
        }
  
Simple merge
Simple merge
Simple merge
index b38b13510eb204ebbbc092632ec581942c0f9409,933eb3c83d8e85fc59ebb825136aa0e641d968cf..8547ccc7b5e4450e24e88b8537bd04ee156868db
@@@ -308,13 -462,16 +505,17 @@@ void BanCommand_(int request
  
  // Do not hard code aliases for these, instead create them in commands.cfg... also: keep in alphabetical order, please ;)
  #define BAN_COMMANDS(request, arguments, command) \
-       BAN_COMMAND("ban", BanCommand_ban(request, arguments, command), "Ban an IP address or a range of addresses (like 1.2.3)") \
-       BAN_COMMAND("banlist", BanCommand_banlist(request), "List all existing bans") \
-       BAN_COMMAND("kickkick", BanCommand_kickkick(request, arguments, command), "Disconnect a client") \
-       BAN_COMMAND("kickban", BanCommand_kickban(request, arguments, command), "Disconnect a client and ban it at the same time") \
-       BAN_COMMAND("mute", BanCommand_mute(request, arguments, command), "Disallow a client from talking by muting them") \
-       BAN_COMMAND("unban", BanCommand_unban(request, arguments), "Remove an existing ban") \
-       BAN_COMMAND("unmute", BanCommand_unmute(request, arguments), "Unmute a client") \
+       BAN_COMMAND("ban",          BanCommand_ban(request, arguments, command),        "Ban an IP address or a range of addresses (like 1.2.3)") \
+       BAN_COMMAND("banlist",      BanCommand_banlist(request),                        "List all existing bans") \
++      BAN_COMMAND("kickkick",     BanCommand_kickkick(request, arguments, command),   "Disconnect a client") \
+       BAN_COMMAND("kickban",      BanCommand_kickban(request, arguments, command),    "Disconnect a client and ban it at the same time") \
+       BAN_COMMAND("mute",         BanCommand_mute(request, arguments, command),       "Disallow a client from talking by muting them") \
+       BAN_COMMAND("playban",      BanCommand_playban(request, arguments, command),    "Force to spectate a client permanently") \
+       BAN_COMMAND("unban",        BanCommand_unban(request, arguments),               "Remove an existing ban") \
+       BAN_COMMAND("unmute",       BanCommand_unmute(request, arguments),              "Unmute a client") \
+       BAN_COMMAND("unvoteban",    BanCommand_unvoteban(request, arguments),           "Remove an existing voting ban") \
+       BAN_COMMAND("unplayban",    BanCommand_unplayban(request, arguments),           "Remove an existing forced to spectate ban") \
+       BAN_COMMAND("voteban",      BanCommand_voteban(request, arguments, command),    "Disallow a client from voting") \
        /* nothing */
  
  void BanCommand_macro_help()
index d75299dfe9430cc18aa7e92f9cc2a73815a9c130,f93880a682d45d6b50c7983c18778b9968ebc1f4..6bb6f615737553e05e04443f786410ceb73a9a2e
@@@ -373,28 -454,20 +454,20 @@@ void ClientCommand_ready(entity caller
        {
                case CMD_REQUEST_COMMAND:
                {
-                       if (IS_CLIENT(caller) && caller.last_ready < time - 3)
+                       if (warmup_stage || g_race_qualifying == 2)
+                       if (IS_PLAYER(caller) || INGAME_JOINED(caller))
                        {
-                               if (warmup_stage || g_race_qualifying == 2)
+                               if (caller.ready) // toggle
                                {
-                                       if (time < game_starttime) // game is already restarting
-                                               return;
-                                       if (caller.ready)            // toggle
-                                       {
-                                               caller.ready = false;
-                                               if (IS_PLAYER(caller) || INGAME_JOINED(caller))
-                                                       bprint("\{1}", playername(caller.netname, caller.team, false), "^2 is ^1NOT^2 ready\n");
-                                       }
-                                       else
-                                       {
-                                               caller.ready = true;
-                                               if (IS_PLAYER(caller) || INGAME_JOINED(caller))
-                                                       bprint("\{1}", playername(caller.netname, caller.team, false), "^2 is ready\n");
-                                       }
-                                       caller.last_ready = time;
-                                       ReadyCount();
+                                       caller.ready = false;
+                                       bprint(playername(caller.netname, caller.team, false), "^2 is ^1NOT^2 ready\n");
+                               }
+                               else
+                               {
+                                       caller.ready = true;
 -                                      bprint(playername(caller.netname, caller.team, false), "^2 is ready\n");
++                                      bprint("\{1}", playername(caller.netname, caller.team, false), "^2 is ready\n");
                                }
+                               ReadyCount();
                        }
                        return;  // never fall through to usage
                }
Simple merge
index 88cfa743fe76aaa7c0f1a7f9b1edc74e99546aad,02cb8e1cec9c730f967833becf5b93b14ea8308d..f1ff5093170c591f9f713d11131e324193261f56
@@@ -219,13 -226,9 +226,13 @@@ void VoteCount(float first_count
        Nagger_VoteCountChanged();
  
        // add up all the votes from each connected client
 -      FOREACH_CLIENT(IS_REAL_CLIENT(it) || autocvar_sv_vote_debug, {
 +      FOREACH_CLIENT(IS_REAL_CLIENT(it) && IS_CLIENT(it), {
 +              // z411
 +              if(vote_target_type == VOTE_TARGET_TEAM && it.team != vote_caller.team) continue;
 +              if(vote_target_type == VOTE_TARGET_SINGLE && it != vote_target) continue;
 +              
                ++vote_player_count;
-               if (IS_PLAYER(it))   ++vote_real_player_count;
+               if (IS_PLAYER(it) || INGAME(it)) ++vote_real_player_count;
                switch (it.vote_selection)
                {
                        case VOTE_SELECT_REJECT:
@@@ -491,9 -483,8 +496,9 @@@ void ReadyRestart_force(bool is_fake_ro
                FOREACH_CLIENT(IS_PLAYER(it) && IS_REAL_CLIENT(it), { CS(it).allowed_timeouts = autocvar_sv_timeout_number; });
        }
  
 +      round_handler_Activate(!warmup_stage);
        if (!sv_ready_restart_after_countdown || warmup_stage)
-               reset_map(true, is_fake_round_start);
+               reset_map(is_fake_round_start);
  
        if (autocvar_sv_eventlog) GameLogEcho(":restart");
  }
index 58baa24b025cb47254425c780179ea4fdea958d9,509d4d233ab559f2b590ca54b9fda25a93d2c7e3..63f624870081c269fc936ec32a9880a6d18be661
@@@ -45,17 -41,15 +46,17 @@@ const float VOTE_TARGET_SINGLE = 2
  // global vote information declarations
  entity vote_caller;         // original caller of the current vote
  string vote_caller_name;    // name of the vote caller
float vote_called;          // stores status of current vote (See VOTE_*)
int vote_called;            // stores status of current vote (See VOTE_*)
  float vote_endtime;         // time when the vote is finished
- float vote_accept_count;    // total amount of players who accept the vote (counted by VoteCount() function)
- float vote_reject_count;    // same as above, but rejected
- float vote_abstain_count;   // same as above, but abstained
- float vote_needed_overall;  // total amount of players NEEDED for a vote to pass (based on sv_vote_majority_factor)
+ int vote_accept_count;      // total amount of players who accept the vote (counted by VoteCount() function)
+ int vote_reject_count;      // same as above, but rejected
+ int vote_abstain_count;     // same as above, but abstained
+ int vote_needed_overall;    // total amount of players NEEDED for a vote to pass (based on sv_vote_majority_factor)
 +float vote_target_type; // z411
 +entity vote_target; // z411
- .float vote_master;         // flag for if the player has vote master privelages
+ .bool vote_master;          // flag for if the player has vote master privileges
  .float vote_waittime;       // flag for how long the player must wait before they can vote again
- .float vote_selection;      // flag for which vote selection the player has made (See VOTE_SELECT_*)
+ .int vote_selection;        // flag for which vote selection the player has made (See VOTE_SELECT_*)
  string vote_called_command; // command sent by client
  string vote_called_display; // visual string of command sent by client
  string vote_parsed_command; // command which is fixed after being parsed
Simple merge
Simple merge
index ab5dc48253aa6d31bfb914be722a3c3ac3c0920a,57720ef9aff2e29fe8912ba276d50bb379e58600..0ae811024009b3ca0cf7722926019e4fbb83b0bf
@@@ -545,15 -530,10 +548,22 @@@ bool Item_GiveTo(entity item, entity pl
                {
                        pickedup = true;
                        FOREACH(Weapons, it != WEP_Null, {
++<<<<<<< HEAD
 +                              Weapon wep = it;
 +                              
 +                              if(w & (wep.m_wepset)) {
 +                                      // z411 Seriously find a better way to do this
 +                                      Item_NotifyWeapon(player, wep.m_id);
 +                                      FOREACH_CLIENT(IS_SPEC(it) && it.enemy == player, { Item_NotifyWeapon(it, wep.m_id); });
 +                              }
 +                              
 +                              if(wp & (wep.m_wepset))
++=======
+                               if(w & (it.m_wepset))
+                                       Item_NotifyWeapon(player, it.m_id);
+                               if(wp & (it.m_wepset))
++>>>>>>> master
                                {
                                        for(int slot = 0; slot < MAX_WEAPONSLOTS; ++slot)
                                        {
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
index d0595fa1869de8e68ab37ee0405b79733625679d,a4b69e24704257b31fdd051355428524b63836dc..527c34e2ed02c34460217ca0d29cd5d1dc69d80a
@@@ -406,21 -388,15 +415,21 @@@ void cvar_changes_init(
                BADCVAR("g_spawn_alloweffects");
                BADCVAR("g_tdm_point_leadlimit");
                BADCVAR("g_tdm_point_limit");
-               BADCVAR("g_mayhem_fraglimit");
-               BADCVAR("g_tmayhem_fraglimit");
-               BADCVAR("g_mayhem_visual_score_limit");
-               BADCVAR("g_tmayhem_visual_score_limit");
-               BADCVAR("g_tmayhem_score_leadlimit");
+               BADCVAR("g_mayhem_point_limit");
+               BADCVAR("g_mayhem_point_leadlimit");
+               BADCVAR("g_tmayhem_point_limit");
+               BADCVAR("g_tmayhem_point_leadlimit");
                BADCVAR("leadlimit_and_fraglimit");
                BADCVAR("leadlimit_override");
 +              BADCVAR("g_mayhem_scoringmethod");
 +              BADCVAR("g_mayhem_scoringmethod_damage_weight");
 +              BADCVAR("g_mayhem_scoringmethod_frag_weight");
 +              BADCVAR("g_tmayhem_scoringmethod");
 +              BADCVAR("g_tmayhem_scoringmethod_damage_weight");
 +              BADCVAR("g_tmayhem_scoringmethod_frag_weight");
                BADCVAR("pausable");
                BADCVAR("sv_announcer");
+               BADCVAR("sv_autopause");
                BADCVAR("sv_checkforpacketsduringsleep");
                BADCVAR("sv_damagetext");
                BADCVAR("sv_db_saveasdump");
@@@ -1093,14 -1056,10 +1100,18 @@@ spawnfunc(worldspawn
  
        WinningConditionHelper(this); // set worldstatus
  
 +      round_handler_Activate(!warmup_stage);
 +      
 +      // for RJZ
 +      if (autocvar_rjz_count_shards && warmup_stage) {
 +              total_shards = -2;
 +              send_TotalShardsAll();
 +      }
 +      
+       if (autocvar_sv_autopause && server_is_dedicated && !wantrestart)
+               // INITPRIO_LAST is to soon: bots either didn't join yet or didn't leave yet, see: bot_fixcount()
+               defer(this, 5, Pause_TryPause_Dedicated);
        world_initialized = 1;
        __spawnfunc_spawn_all();
  }
@@@ -1380,10 -1339,8 +1391,10 @@@ void NextLevel(
        */
  
        //pos = FindIntermission ();
 +      
 +      sound(NULL, CH_INFO, SND_ENDMATCH, VOL_BASE, ATTN_NONE);
  
-       VoteReset();
+       VoteReset(true);
  
        DumpStats(true);
  
@@@ -2254,13 -2121,12 +2265,14 @@@ void readlevelcvars(
        serverflags &= ~SERVERFLAG_ALLOW_FULLBRIGHT;
        if(cvar("sv_allow_fullbright"))
                serverflags |= SERVERFLAG_ALLOW_FULLBRIGHT;
 +      if(cvar("sv_forbid_pickuptimer"))
 +              serverflags |= SERVERFLAG_FORBID_PICKUPTIMER;
  
-       sv_ready_restart_after_countdown = cvar("sv_ready_restart_after_countdown");
+       serverflags &= ~SERVERFLAG_FORBID_PICKUPTIMER;
+       if(cvar("sv_forbid_pickuptimer"))
+               serverflags |= SERVERFLAG_FORBID_PICKUPTIMER;
  
-       warmup_stage = cvar("g_warmup");
-       warmup_limit = cvar("g_warmup_limit");
+       sv_ready_restart_after_countdown = cvar("sv_ready_restart_after_countdown");
  
        if(cvar("g_campaign"))
                warmup_stage = 0; // no warmup during campaign
index 06e454bc9c72feee11c569edf0067ddf0f95377d,ff799e64cc529d7d406aebd5d929d12cb25b4766..1631d18b717405420b095d76241bca376c051c40
@@@ -30,13 -31,8 +31,18 @@@ float autocvar_timelimit_suddendeath
  bool autocvar_sv_gameplayfix_droptofloorstartsolid;
  bool autocvar_sv_gameplayfix_droptofloorstartsolid_nudgetocorrect;
  
++<<<<<<< HEAD
 +// z411
 +bool autocvar_sv_jingle_end;
 +string autocvar_sv_jingle_end_list;
 +float autocvar_sv_jingle_end_volume;
 +
 +float fragsleft;
 +int fragsleft_last;
++=======
+ bool autocvar_sv_mapformat_is_quake3;
+ bool autocvar_sv_mapformat_is_quake2;
++>>>>>>> master
  
  float checkrules_equality;
  float checkrules_suddendeathwarning;
Simple merge