]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Merge branch 'master' into z411/bai-server
authorz411 <z411@omaera.org>
Thu, 15 Apr 2021 01:58:33 +0000 (21:58 -0400)
committerz411 <z411@omaera.org>
Thu, 15 Apr 2021 01:58:33 +0000 (21:58 -0400)
50 files changed:
1  2 
qcsrc/client/announcer.qc
qcsrc/client/hud/panel/centerprint.qc
qcsrc/client/hud/panel/chat.qc
qcsrc/client/hud/panel/scoreboard.qc
qcsrc/client/main.qc
qcsrc/client/shownames.qc
qcsrc/common/command/generic.qc
qcsrc/common/ent_cs.qc
qcsrc/common/ent_cs.qh
qcsrc/common/gamemodes/gamemode/clanarena/sv_clanarena.qc
qcsrc/common/gamemodes/gamemode/ctf/sv_ctf.qc
qcsrc/common/gamemodes/gamemode/ctf/sv_ctf.qh
qcsrc/common/gamemodes/gamemode/cts/sv_cts.qc
qcsrc/common/gamemodes/gamemode/freezetag/sv_freezetag.qc
qcsrc/common/gamemodes/gamemode/race/sv_race.qc
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/notifications/all.qh
qcsrc/common/replicate.qh
qcsrc/common/scores.qh
qcsrc/common/sounds/all.inc
qcsrc/common/stats.qh
qcsrc/common/turrets/all.qh
qcsrc/common/util.qc
qcsrc/common/weapons/all.qh
qcsrc/common/weapons/weapon/electro.qc
qcsrc/common/weapons/weapon/vaporizer.qc
qcsrc/common/weapons/weapon/vortex.qc
qcsrc/ecs/systems/sv_physics.qc
qcsrc/menu/xonotic/credits.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/damage.qc
qcsrc/server/damage.qh
qcsrc/server/round_handler.qc
qcsrc/server/scores.qc
qcsrc/server/teamplay.qc
qcsrc/server/teamplay.qh
qcsrc/server/weapons/accuracy.qc
qcsrc/server/weapons/accuracy.qh
qcsrc/server/weapons/weaponsystem.qc
qcsrc/server/world.qc
qcsrc/server/world.qh

index e5c18a559b243ec3ce99d342db2d4f64210991e0,a5b3eecb113348059da3013953e4697ff5b18a42..301185a922586a0ed69081ee77712065d0aa1d9e
@@@ -2,13 -2,8 +2,12 @@@
  
  #include <client/hud/panel/centerprint.qh>
  #include <client/mutators/_mod.qh>
  #include <common/notifications/all.qh>
  #include <common/stats.qh>
 +#include <common/mapinfo.qh>
 +
 +#include <common/ent_cs.qh>
 +#include <common/gamemodes/gamemode/duel/duel.qh>
  
  bool announcer_1min;
  bool announcer_5min;
index 16b0b0e0dcb36d48d739f6187d99f9117d7a6bbf,105908094e5e0cc77ee41f0e0b8713b97b37a21d..f9802ba813946bdacebf7804ee12cf1493c6cd9e
@@@ -43,41 -43,6 +43,44 @@@ float centerprint_expire_time[CENTERPRI
  int centerprint_countdown_num[CENTERPRINT_MAX_MSGS];
  bool centerprint_showing;
  
++<<<<<<< HEAD
 +float centerprint_medal_expire_time;
 +string centerprint_medal_icon;
 +float centerprint_medal_times;
 +
 +bool centerprint_title_show;
 +string centerprint_title;
 +
 +void centerprint_ClearTitle()
 +{
 +      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)
 +{
 +      //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;
 +}
 +
++=======
++>>>>>>> master
  void centerprint_Add(int new_id, string strMessage, float duration, int countdown_num)
  {
        TC(int, new_id); TC(int, countdown_num);
@@@ -357,10 -275,10 +361,17 @@@ void HUD_CenterPrint(
                all_messages_expired = false;
  
                // fade
++<<<<<<< HEAD
 +              //if(centerprint_time[j] < 0)  // Expired but forced. Expire time is the fade-in time.
 +              //      a = (time - centerprint_expire_time[j]) / max(0.0001, autocvar_hud_panel_centerprint_fade_in);
 +              if(centerprint_time[j] < 0 || centerprint_expire_time[j] - autocvar_hud_panel_centerprint_fade_out > time)  // Regularily printed. Not fading out yet.
 +                      a = 1;
++=======
+               if(centerprint_time[j] < 0)  // Expired but forced. Expire time is the fade-in time.
+                       a = (time - centerprint_expire_time[j]) / max(0.0001, autocvar_hud_panel_centerprint_fade_in);
+               else if(centerprint_expire_time[j] - autocvar_hud_panel_centerprint_fade_out > time)  // Regularily printed. Not fading out yet.
+                       a = (time - (centerprint_expire_time[j] - centerprint_time[j])) / max(0.0001, autocvar_hud_panel_centerprint_fade_in);
++>>>>>>> master
                else // Expiring soon, so fade it out.
                        a = (centerprint_expire_time[j] - time) / max(0.0001, autocvar_hud_panel_centerprint_fade_out);
  
index 33f8b6a13923d2179d411a9003f97a1740c4ebac,972848260dcc94ab74d4c5fafa735517782d2625..c126259b1fd0810b48e509163c2e7d0dd4c0b3d2
@@@ -75,15 -74,23 +75,23 @@@ void HUD_Chat(
        if (!autocvar_con_chatrect)
                cvar_set("con_chatrect", "1");
  
-       cvar_set("con_chatrect_x", ftos(pos.x/vid_conwidth));
-       cvar_set("con_chatrect_y", ftos(pos.y/vid_conheight));
-       cvar_set("con_chatwidth", ftos(mySize.x/vid_conwidth));
-       cvar_set("con_chat", ftos(floor(mySize.y/autocvar_con_chatsize - 0.5)));
+       // can't use a name ending with _x, _y and _z for a float autocvar as for autocvar specs
+       // it prevents ambiguity with component names of vector autocvars
+       if (cvar_string("con_chatrect_x") != ftos(pos.x / vid_conwidth))
+               cvar_set("con_chatrect_x", ftos(pos.x / vid_conwidth));
+       if (cvar_string("con_chatrect_y") != ftos(pos.y / vid_conheight))
+               cvar_set("con_chatrect_y", ftos(pos.y / vid_conheight));
+       // can't use direct comparison here, it would always returns true even if
+       // both arguments are equal because con_chatwidth is saved with cvar_set
+       //if (autocvar_con_chatwidth != mySize.x / vid_conwidth)
+       if (fabs(autocvar_con_chatwidth - mySize.x / vid_conwidth) > 0.00001)
+               cvar_set("con_chatwidth", ftos(mySize.x / vid_conwidth));
+       if (autocvar_con_chat != floor(mySize.y / autocvar_con_chatsize - 0.5))
+               cvar_set("con_chat", ftos(floor(mySize.y / autocvar_con_chatsize - 0.5)));
  
 +      vector chatsize = '1 1 0' * autocvar_con_chatsize;
        if(autocvar__hud_configure)
        {
 -              vector chatsize = '1 1 0' * autocvar_con_chatsize;
                cvar_set("con_chatrect_x", "9001"); // over 9000, we'll fake it instead for more control over alpha and such
                string str = textShortenToWidth(_("^3Player^7: This is the chat area."), mySize.x, chatsize, stringwidth_colors);
                for(int i = 0; i < autocvar_con_chat; ++i)
index 0b788fdb1eead216f03cdd8b913f05a7595339bc,24b6efe6ca582733cfc9303ae980756a08052d1c..e6d718f1af32baf35d0ce6a981fe8dcd8fac87fa
@@@ -105,8 -103,6 +111,7 @@@ 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 = " ";
 +int average_ping[NUM_TEAMS];
  
  // mode 0: returns translated label
  // mode 1: prints name and description of all the labels
@@@ -2271,10 -1997,10 +2433,12 @@@ void Scoreboard_Draw(
                pos = Scoreboard_MakeTable(pos, tm, panel_bg_color, bg_size);
        }
  
 +      pos = Scoreboard_MedalStats_Draw(pos);
 +      
        if (Scoreboard_AccuracyStats_WouldDraw(pos.y))
                pos = Scoreboard_AccuracyStats_Draw(pos, panel_bg_color, bg_size);
+       if (Scoreboard_ItemStats_WouldDraw(pos.y))
+               pos = Scoreboard_ItemStats_Draw(pos, panel_bg_color, bg_size);
  
        if(MUTATOR_CALLHOOK(ShowRankings)) {
                string ranktitle = M_ARGV(0, string);
Simple merge
index af4d766ec0ef225b9fe859ad9ddac678b9b6757b,27157a5a165fa1c9dc904cf2e0e36e4aec1c9893..23e4f7a208baac35752cf9681e137d916ec94320
@@@ -141,60 -154,67 +154,122 @@@ void Draw_ShowNames(entity this
        }
        else if (vdist(this.origin - view_origin, >=, max_shot_distance))
                return;
++<<<<<<< HEAD
 +      if (!a) return;
++=======
+       if (!a || o.z < 0) return;
+       o.z = 0;
++>>>>>>> master
        float resize = 1;
-       if (autocvar_hud_shownames_resize)  // limit resize so its never smaller than 0.5... gets unreadable
+       if (autocvar_hud_shownames_resize && vdist(this.origin - view_origin, >=, autocvar_hud_shownames_mindistance))
        {
++<<<<<<< HEAD
 +              if (vdist(this.origin - view_origin, >=, autocvar_hud_shownames_mindistance))
 +              {
 +                      float f = autocvar_hud_shownames_maxdistance - autocvar_hud_shownames_mindistance;
 +                      if (dist == -1)
 +                              dist = vlen(this.origin - view_origin);
 +                      resize = 0.5 + 0.5 * (f - max(0, dist - autocvar_hud_shownames_mindistance)) / f;
 +              }
++=======
+               // limit resize so its never smaller than 0.5... gets unreadable
+               float f = autocvar_hud_shownames_maxdistance - autocvar_hud_shownames_mindistance;
+               if (dist == -1)
+                       dist = vlen(this.origin - view_origin);
+               resize = 0.5 + 0.5 * (f - max(0, dist - autocvar_hud_shownames_mindistance)) / f;
++>>>>>>> master
        }
-       // draw the sprite image
-       if (o.z >= 0)
+       vector mySize = (vec2(autocvar_hud_shownames_aspect, 1)) * autocvar_hud_shownames_fontsize;
+       vector myPos = o - vec2(0.5 * mySize.x, mySize.y);
+       mySize.x *= resize;
+       mySize.y *= resize;
+       myPos.x += 0.5 * (mySize.x / resize - mySize.x);
+       myPos.y += (mySize.y / resize - mySize.y);
+       this.box_org = myPos + mySize / 2;
+       this.box_ofs = mySize / 2;
+       float namewidth = mySize.x;
+       if (autocvar_hud_shownames_status && this.sameteam && !this.csqcmodel_isdead)
        {
++<<<<<<< HEAD
 +              o.z = 0;
 +              vector mySize = (vec2(autocvar_hud_shownames_aspect, 1)) * autocvar_hud_shownames_fontsize;
 +              vector myPos = o - vec2(0.5 * mySize.x, mySize.y);
 +              // size scaling
 +              mySize.x *= resize;
 +              mySize.y *= resize;
 +              myPos.x += 0.5 * (mySize.x / resize - mySize.x);
 +              myPos.y += (mySize.y / resize - mySize.y);
 +              // this is where the origin of the string
 +              float namewidth = mySize.x;
 +              if (autocvar_hud_shownames_status && this.sameteam && !this.csqcmodel_isdead)
 +              {
 +                      vector pos = myPos + eY * autocvar_hud_shownames_fontsize * resize;
 +                      vector sz = vec2(0.5 * mySize.x, resize * autocvar_hud_shownames_statusbar_height);
 +                      if (autocvar_hud_shownames_statusbar_highlight)
 +                              drawfill(pos + eX * 0.25 * mySize.x, sz, '0.7 0.7 0.7', a / 2, DRAWFLAG_NORMAL);
 +                      if (this.healthvalue > 0)
 +                      {
 +                              HUD_Panel_DrawProgressBar(pos, sz, "nametag_statusbar",
 +                                      this.healthvalue / autocvar_hud_panel_healtharmor_maxhealth, false, 1, '1 0 0', a,
 +                                      DRAWFLAG_NORMAL);
 +                      }
 +                      if (GetResource(this, RES_ARMOR) > 0)
 +                      {
 +                              HUD_Panel_DrawProgressBar(pos + eX * 0.5 * mySize.x, sz, "nametag_statusbar",
 +                                      GetResource(this, RES_ARMOR) / autocvar_hud_panel_healtharmor_maxarmor, false, 0, '0 1 0', a,
 +                                      DRAWFLAG_NORMAL);
 +                      }
 +              }
 +              string s = entcs_GetName(this.sv_entnum - 1);
 +              if ((autocvar_hud_shownames_decolorize == 1 && teamplay) || autocvar_hud_shownames_decolorize == 2)
 +                      s = playername(s, entcs_GetTeam(this.sv_entnum - 1), true);
 +              drawfontscale = '1 1 0' * resize;
 +              s = textShortenToWidth(s, namewidth, '1 1 0' * autocvar_hud_shownames_fontsize, stringwidth_colors);
 +              float width = stringwidth(s, true, '1 1 0' * autocvar_hud_shownames_fontsize);
 +              myPos.x = o.x - (width * resize) / 2;
 +              drawcolorcodedstring(myPos, s, '1 1 0' * autocvar_hud_shownames_fontsize, a, DRAWFLAG_NORMAL);
 +              drawfontscale = '1 1 0';
++=======
+               vector pos = myPos + eY * autocvar_hud_shownames_fontsize * resize;
+               vector sz = vec2(0.5 * mySize.x, resize * autocvar_hud_shownames_statusbar_height);
+               this.box_ofs.x = max(mySize.x / 2, sz.x); // sz.x is already half as wide
+               this.box_ofs.y += sz.y / 2;
+               this.box_org.y = myPos.y + (mySize.y + sz.y) / 2;
+               // antioverlap debug code
+               //drawfill(this.box_org - this.box_ofs, this.box_ofs * 2, '1 1 1', a / 2, DRAWFLAG_NORMAL);
+               if (autocvar_hud_shownames_statusbar_highlight)
+                       drawfill(pos + eX * 0.25 * mySize.x, sz, '0.7 0.7 0.7', a / 2, DRAWFLAG_NORMAL);
+               if (this.healthvalue > 0)
+               {
+                       HUD_Panel_DrawProgressBar(pos, sz, "nametag_statusbar",
+                               this.healthvalue / autocvar_hud_panel_healtharmor_maxhealth, false, 1, '1 0 0', a,
+                               DRAWFLAG_NORMAL);
+               }
+               if (GetResource(this, RES_ARMOR) > 0)
+               {
+                       HUD_Panel_DrawProgressBar(pos + eX * 0.5 * mySize.x, sz, "nametag_statusbar",
+                               GetResource(this, RES_ARMOR) / autocvar_hud_panel_healtharmor_maxarmor, false, 0, '0 1 0', a,
+                               DRAWFLAG_NORMAL);
+               }
++>>>>>>> master
        }
+       // antioverlap debug code
+       //else drawfill(this.box_org - this.box_ofs, this.box_ofs * 2, '1 1 1', a / 2, DRAWFLAG_NORMAL);
+       string s = entcs_GetName(this.sv_entnum - 1);
+       if ((autocvar_hud_shownames_decolorize == 1 && teamplay) || autocvar_hud_shownames_decolorize == 2)
+               s = playername(s, entcs_GetTeam(this.sv_entnum - 1), true);
+       drawfontscale = '1 1 0' * resize;
+       s = textShortenToWidth(s, namewidth, '1 1 0' * autocvar_hud_shownames_fontsize, stringwidth_colors);
+       float width = stringwidth(s, true, '1 1 0' * autocvar_hud_shownames_fontsize);
+       myPos.x = o.x - (width * resize) / 2;
+       drawcolorcodedstring(myPos, s, '1 1 0' * autocvar_hud_shownames_fontsize, a, DRAWFLAG_NORMAL);
+       drawfontscale = '1 1 0';
  }
  
  void Draw_ShowNames_All()
index e354a9a5915e119cabef6b00f7424f7bd4c70b7b,929d3765345084e1e85917705e498417e46563c0..566b1cfeea2ce214c1bb6f57574487ac06323790
@@@ -303,10 -303,10 +303,17 @@@ void GenericCommand_maplist(int request
                        LOG_INFOF("Incorrect parameters for ^2%s^7", argv(0));
                case CMD_REQUEST_USAGE:
                {
++<<<<<<< HEAD
 +                      LOG_HELP("Usage:^3 ", GetProgramCommandPrefix(), " maplist action [map]");
 +                      LOG_HELP("  Where 'action' is the command to complete,");
 +                      LOG_HELP("  and 'map' is what it acts upon (if required).");
 +                      LOG_HELP("  Full list of commands here: \"add, cleanup, remove, shuffle.\"");
++=======
+                       LOG_HELP("Usage:^3 ", GetProgramCommandPrefix(), " maplist <action> [<map>]");
+                       LOG_HELP("  Where <action> is the command to complete,");
+                       LOG_HELP("  and <map> is what it acts upon (for the 'add' and 'remove' actions).");
+                       LOG_HELP("  Full list of commands here: add, cleanup, remove, shuffle.");
++>>>>>>> master
                        return;
                }
        }
@@@ -325,8 -325,8 +332,13 @@@ void GenericCommand_nextframe(int reque
                default:
                case CMD_REQUEST_USAGE:
                {
++<<<<<<< HEAD
 +                      LOG_HELP("Usage:^3 ", GetProgramCommandPrefix(), " nextframe command...");
 +                      LOG_HELP("  Where command will be executed next frame of this VM");
++=======
+                       LOG_HELP("Usage:^3 ", GetProgramCommandPrefix(), " nextframe <command>");
+                       LOG_HELP("  Where <command> will be executed next frame of this VM");
++>>>>>>> master
                        return;
                }
        }
@@@ -502,7 -502,7 +514,11 @@@ void GenericCommand_runtest(int request
                default:
                case CMD_REQUEST_USAGE:
                {
++<<<<<<< HEAD
 +                      LOG_HELP("Usage:^3 ", GetProgramCommandPrefix(), " [function to run]");
++=======
+                       LOG_HELP("Usage:^3 ", GetProgramCommandPrefix(), " <function>");
++>>>>>>> master
                        return;
                }
        }
index fb0981150658e3cbf7fa7ccdf621ec89bc3e650e,a3691386be379296ae2b494025666e320a13de18..fbce8a70e5806bf102eb0a43e5e6fbd2983bdc30
@@@ -161,19 -157,25 +161,30 @@@ ENTCS_PROP(SOLID, true, sv_solid, solid
        { WriteByte(chan, ent.sv_solid); },
        { ent.sv_solid = ReadByte(); })
  
 +// z411 weapon
 +ENTCS_PROP(ACTIVEWEPID, false, activewepid, activewepid, ENTCS_SET_NORMAL,
 +      { WriteByte(chan, ent.activewepid); },
 +      { ent.activewepid = ReadByte(); })
 +
  #ifdef SVQC
  
-       int ENTCS_PUBLICMASK = 0;
+       int ENTCS_PUBLICMASK = 0, ENTCS_PRIVATEMASK = 0;
        STATIC_INIT(ENTCS_PUBLICMASK)
        {
-               FOREACH(EntCSProps, it.m_public,
+               FOREACH(EntCSProps, true,
                {
-                       ENTCS_PUBLICMASK |= BIT(it.m_id);
+                       if (it.m_public)
+                               ENTCS_PUBLICMASK |= BIT(it.m_id);
+                       else
+                               ENTCS_PRIVATEMASK |= BIT(it.m_id);
+               });
+       }
+       void entcs_update_players(entity player)
+       {
+               FOREACH_CLIENT(it != player && IS_PLAYER(it),
+               {
+                       CS(it).entcs.SendFlags |= ENTCS_PRIVATEMASK;
                });
        }
  
Simple merge
index 7c83260d005376c01f72644c750369b08202e35b,458465faaa260587a60563407fa72630d228c21e..039827e79848dec0424f30c27493e0dbbb535fb8
@@@ -292,42 -263,8 +263,47 @@@ MUTATOR_HOOKFUNCTION(cts, GetPressedKey
  {
        entity player = M_ARGV(0, entity);
  
++<<<<<<< HEAD
 +      if(CS_CVAR(player).cvar_cl_allow_uidtracking == 1 && CS_CVAR(player).cvar_cl_allow_uid2name == 1)
 +      {
 +              if (!player.stored_netname)
 +                      player.stored_netname = strzone(uid2name(player.crypto_idfp));
 +              if(player.stored_netname != player.netname)
 +              {
 +                      db_put(ServerProgsDB, strcat("/uid2name/", player.crypto_idfp), player.netname);
 +                      strcpy(player.stored_netname, player.netname);
 +              }
 +      }
 +
 +      if (!IS_OBSERVER(player))
 +      {
 +              if(vdist(player.velocity - player.velocity_z * '0 0 1', >, speedaward_speed))
 +              {
 +                      speedaward_speed = vlen(player.velocity - player.velocity_z * '0 0 1');
 +                      speedaward_holder = player.netname;
 +                      speedaward_uid = player.crypto_idfp;
 +                      speedaward_lastupdate = time;
 +              }
 +              if (speedaward_speed > speedaward_lastsent && time - speedaward_lastupdate > 1)
 +              {
 +                      string rr = CTS_RECORD;
 +                      race_send_speedaward(MSG_ALL);
 +                      speedaward_lastsent = speedaward_speed;
 +                      if (speedaward_speed > speedaward_alltimebest && speedaward_uid != "")
 +                      {
 +                              speedaward_alltimebest = speedaward_speed;
 +                              speedaward_alltimebest_holder = speedaward_holder;
 +                              speedaward_alltimebest_uid = speedaward_uid;
 +                              db_put(ServerProgsDB, strcat(GetMapname(), rr, "speed/speed"), ftos(speedaward_alltimebest));
 +                              db_put(ServerProgsDB, strcat(GetMapname(), rr, "speed/crypto_idfp"), speedaward_alltimebest_uid);
 +                              race_send_speedaward_alltimebest(MSG_ALL);
 +                      }
 +              }
 +      }
++=======
+       race_checkAndWriteName(player);
+       race_SpeedAwardFrame(player);
++>>>>>>> master
  }
  
  MUTATOR_HOOKFUNCTION(cts, ForbidThrowCurrentWeapon)
index 5eb256320336d994e0d99c9ac7908141ee5ed472,54fac9a5ab0a70a8eb5d4ea57082b3a6719e0015..abddb303052777ef03f24f551989a461c80e5899
@@@ -625,14 -606,20 +645,21 @@@ MUTATOR_HOOKFUNCTION(ft, PlayerPreThink
                                nades_GiveBonus(it, autocvar_g_nades_bonus_score_low);
                        }
  
-                       entity first = reviving_players_first;
-                       Send_Notification(NOTIF_ONE, player, MSG_CENTER, CENTER_FREEZETAG_REVIVED, first.netname);
-                       Send_Notification(NOTIF_ONE, first, MSG_CENTER, CENTER_FREEZETAG_REVIVE, player.netname);
-                       Send_Notification(NOTIF_ALL, NULL, MSG_INFO, INFO_FREEZETAG_REVIVED, player.netname, first.netname);
+                       Send_Notification(NOTIF_ONE, player, MSG_CENTER, CENTER_FREEZETAG_REVIVED, revivers_first.netname);
+                       Send_Notification(NOTIF_ONE, revivers_first, MSG_CENTER, CENTER_FREEZETAG_REVIVE, player.netname);
+                       Send_Notification(NOTIF_ALL, NULL, MSG_INFO, INFO_FREEZETAG_REVIVED, player.netname, revivers_first.netname);
 +                      Give_Medal(first, ASSIST);
+                       if(autocvar_sv_eventlog)
+                       {
+                               string revivers = "";
+                               for(entity it = revivers_first; it; it = it.chain)
+                                       revivers = strcat(revivers, ftos(it.playerid), ",");
+                               revivers = substring(revivers, 0, strlen(revivers) - 1);
+                               GameLogEcho(strcat(":ft:revival:", ftos(player.playerid), ":", revivers));
+                       }
                }
  
-               for(entity it = reviving_players_first; it; it = it.chain)
+               for(entity it = revivers_first; it; it = it.chain)
                        STAT(REVIVE_PROGRESS, it) = STAT(REVIVE_PROGRESS, player);
        }
  
index c87384c94bc3377c45f27fa6d7ac422585c6657f,ecfd3660588cf91275a71f079d9994aa1bf1ab0f..fa741ccab3cc7f69e6396100bd0afc26beafbc57
@@@ -142,14 -136,7 +136,7 @@@ MUTATOR_HOOKFUNCTION(rc, PlayerPhysics
        player.race_movetime_frac -= f;
        player.race_movetime_count += f;
        player.race_movetime = player.race_movetime_frac + player.race_movetime_count;
- }
- MUTATOR_HOOKFUNCTION(rc, PlayerPhysics)
- {
-       entity player = M_ARGV(0, entity);
-       //float dt = M_ARGV(1, float);
--
- #ifdef SVQC
++      
        if(IS_PLAYER(player))
        {
                if (player.race_penalty)
index c0a94707bc3b5f9dccb4191924f1b89ead07ac9f,abc367d51389615815274c79100f7a462e208e31..49341c9ccbf6157276bbaa8c4497a7836a954181
@@@ -37,21 -37,18 +37,29 @@@ STATIC_INIT(Inventory
  #endif
  
  #ifdef CSQC
 -Inventory g_inventory;
 +#include <client/hud/hud.qh>
 +
 +//Inventory g_inventory;
 +Inventory inventoryslots[255];
 +float last_pickup_timer;
 +entity last_pickup_item;
 +int last_pickup_times;
++
+ void Inventory_remove(entity this)
+ {
+     if(g_inventory == this)
+         g_inventory = NULL;
+ }
  NET_HANDLE(ENT_CLIENT_INVENTORY, bool isnew)
  {
      make_pure(this);
 -    g_inventory = this;
 +    //g_inventory = this;
+     this.entremove = Inventory_remove;
 +      
 +      float entnum = ReadByte() - 1;
 +      inventoryslots[entnum] = this;
-       
++
      const int majorBits = Readbits(Inventory_groups_major);
      for (int i = 0; i < Inventory_groups_major; ++i) {
          if (!(majorBits & BIT(i))) {
@@@ -147,10 -124,6 +155,10 @@@ bool Inventory_Send(Inventory this, Cli
      TC(Inventory, this);
      WriteHeader(MSG_ENTITY, ENT_CLIENT_INVENTORY);
      TC(PlayerState, this.owner);
-       
++    
 +    // z411 send entity number
 +    WriteByte(MSG_ENTITY, etof(this.owner.m_client));
 +    
      Inventory_Write(this, to.inventory_store);
      return true;
  }
@@@ -164,22 -137,22 +172,22 @@@ bool Inventory_customize(entity this, e
  void Inventory_new(PlayerState this)
  {
      Inventory inv = NEW(Inventory);
 -    setcefc(inv, Inventory_customize);
 +    if(!g_duel) setcefc(inv, Inventory_customize);
      Net_LinkEntity((inv.owner = this).inventory = inv, false, 0, Inventory_Send);
  }
- void Inventory_delete(entity e) { delete(e.inventory.inventory); delete(e.inventory); }
+ void Inventory_delete(entity e) { delete(e.inventory); }
  void Inventory_update(entity e) { e.inventory.SendFlags = 0xFFFFFF; }
  
 -void Inventory_clear(entity store)
 -{
 -    // NOTE: you will need to perform Inventory_update after this to update the storage entity
 -    // (unless store is the storage entity)
 -    FOREACH(Items, true, {
 -        .int fld = inv_items[it.m_id];
 -        store.(fld) = 0;
 -    });
 -}
 -
  void InventoryStorage_attach(entity e) { e.inventory_store = NEW(Inventory); e.inventory_store.drawonlytoclient = e; }
 -void InventoryStorage_delete(entity e) { delete(e.inventory_store); }
 +void InventoryStorage_detach(entity e) { delete(e.inventory_store); }
 +
 +void Inventory_ClearAll() {
 +      FOREACH_CLIENT(IS_PLAYER(it), {
 +              entity store = PS(it);          
 +              FOREACH(Items, true, {
 +                      store.inventory.inv_items[it.m_id] = 0;
 +              });
 +        Inventory_update(store);
 +      });
 +}
  #endif
Simple merge
index a4e55983ff208a9d6521ca3506de93bb89d837f4,aefc7234692f4e606075d2493dd785ea492dff30..80ccdd7d8356cbbd9ca7febdffa41b913ccc7791
@@@ -94,20 -94,18 +94,20 @@@ void W_OverkillNex_Attack(Weapon thiswe
        }
  
        yoda = 0;
-       damage_goodhits = 0;
+       impressive_hits = 0;
        FireRailgunBullet(actor, weaponentity, w_shotorg, w_shotorg + w_shotdir * max_shot_distance, mydmg, true, myforce, mymindist, mymaxdist, myhalflife, myforcehalflife, thiswep.m_id);
  
 -      if(yoda && flying)
 -              Send_Notification(NOTIF_ONE, actor, MSG_ANNCE, ANNCE_ACHIEVEMENT_YODA);
 +      if(yoda && flying) {
 +              Give_Medal(actor, YODA);
 +      }
 +              
-       if(damage_goodhits && actor.oknex_lasthit)
+       if(impressive_hits && actor.oknex_lasthit)
        {
 -              Send_Notification(NOTIF_ONE, actor, MSG_ANNCE, ANNCE_ACHIEVEMENT_IMPRESSIVE);
 +              Give_Medal(actor, IMPRESSIVE);
-               damage_goodhits = 0; // only every second time
+               impressive_hits = 0; // only every second time
        }
  
-       actor.oknex_lasthit = damage_goodhits;
+       actor.oknex_lasthit = impressive_hits;
  
        //beam and muzzle flash done on client
        SendCSQCVortexBeamParticle(charge);
index d08089143a15cb3ee525a07eebe20231e5e98269,5a7b0af0f3f76c356c8ae37a5ce94e113f771497..0b1bf60633983394d4de2b689c052b08a5acb008
@@@ -163,16 -158,11 +163,18 @@@ void Create_Notification_Entity_Choice(
                                                                                Notification optiona,
                                                                                Notification optionb);
  
 +void Create_Notification_Entity_Medal(entity notif,
 +                                                                              float var_cvar,
 +                                                                              string namestring,
 +                                                                              /* MSG_MEDAL */
 +                                                                              string icon,
 +                                                                              Notification anncename);
 +
  void Dump_Notifications(int fh, bool alsoprint);
  
- GENERIC_COMMAND(dumpnotifs, "Dump all notifications into notifications_dump.txt", false)
+ #define DEFAULT_FILENAME "notifications_dump.cfg"
+ // NOTE: dumpeffectinfo, dumpnotifs, dumpturrets and dumpweapons use similar code
+ GENERIC_COMMAND(dumpnotifs, "Dump all notifications into " DEFAULT_FILENAME, false)
  {
        switch (request)
        {
                default:
                case CMD_REQUEST_USAGE:
                {
++<<<<<<< HEAD
 +                      LOG_HELP("Usage:^3 ", GetProgramCommandPrefix(), " dumpnotifs [filename]");
 +                      LOG_HELP("  Where 'filename' is the file to write (default is notifications_dump.cfg),");
++=======
+                       LOG_HELP("Usage:^3 ", GetProgramCommandPrefix(), " dumpnotifs [<filename>]");
+                       LOG_HELPF("  Where <filename> is the file to write (default is %s),", DEFAULT_FILENAME);
++>>>>>>> master
                        LOG_HELP("  if supplied with '-' output to console as well as default,");
                        LOG_HELP("  if left blank, it will only write to default.");
                        return;
@@@ -830,14 -743,14 +838,21 @@@ Notification Get_Notif_Ent(MSG net_type
        return it;
  }
  
++<<<<<<< HEAD
 +#define MSG_ANNCE_NOTIF_TEAM(teamnum, name, cvarname, defaultvalue, sound, channel, volume, position, queuetime) \
 +      MSG_ANNCE_NOTIF_(teamnum, ANNCE_##name, ANNCE_##cvarname, defaultvalue, sound, channel, volume, position, queuetime)
 +
 +#define MSG_ANNCE_NOTIF(name, defaultvalue, sound, channel, volume, position, queuetime) \
++=======
+ #define MSG_ANNCE_NOTIF_TEAM(teamnum, name, cvarname, defaultvalue, sound, channel, volume, position) \
+       MSG_ANNCE_NOTIF_(teamnum, ANNCE_##name, ANNCE_##cvarname, defaultvalue, sound, channel, volume, position)
+ #define MSG_ANNCE_NOTIF(name, defaultvalue, sound, channel, volume, position) \
++>>>>>>> master
        NOTIF_ADD_AUTOCVAR(ANNCE_##name, defaultvalue) \
 -      MSG_ANNCE_NOTIF_(0, ANNCE_##name, ANNCE_##name, defaultvalue, sound, channel, volume, position)
 +      MSG_ANNCE_NOTIF_(0, ANNCE_##name, ANNCE_##name, defaultvalue, sound, channel, volume, position, queuetime)
  
 -#define MSG_ANNCE_NOTIF_(teamnum, name, cvarname, defaultvalue, sound, channel, volume, position) \
 +#define MSG_ANNCE_NOTIF_(teamnum, name, cvarname, defaultvalue, sound, channel, volume, position, queuetime) \
        REGISTER(Notifications, name, m_id, new_pure(msg_annce_notification)) { \
                Create_Notification_Entity      (this, defaultvalue, ACVNN(cvarname), MSG_ANNCE, strtoupper(#name), teamnum); \
                Create_Notification_Entity_Annce(this, ACVNN(cvarname), strtoupper(#name), \
index ad79d2cc7ac5461dd7ed310b45002efc677036e1,f9cb040fa8a2542141db235d56ffbec5b4d31caa..7c10cce3245ec2c7a62b8c544b5d640b552dbd83
@@@ -8,9 -8,8 +8,9 @@@
        bool cvar_cl_allow_uidranking;
        float cvar_cl_autoscreenshot;
        float cvar_cl_autotaunt;
-       float cvar_cl_clippedspectating;
+       bool cvar_cl_clippedspectating;
        int cvar_cl_gunalign;
 +      bool cvar_cl_chat_sounds;
        float cvar_cl_handicap;
        float cvar_cl_jetpack_jump;
        float cvar_cl_movement_track_canjump;
@@@ -29,8 -28,7 +29,8 @@@
  #elif defined(SVQC)
        .float cvar_cl_handicap;
        .int cvar_cl_gunalign;
-       .float cvar_cl_clippedspectating;
 +      .bool cvar_cl_chat_sounds;
+       .bool cvar_cl_clippedspectating;
        .float cvar_cl_autoscreenshot;
        .float cvar_cl_jetpack_jump;
        .float cvar_cl_movement_track_canjump;
Simple merge
Simple merge
Simple merge
index e44c5d9b544d67b9c717580127fdb18f3cb1a14b,5bebc285db77fbcdc8c9fc5c75686601a3911ac0..578b3521d638498113f5a004a727e19ddb6521b4
@@@ -100,8 -102,8 +102,13 @@@ GENERIC_COMMAND(dumpturrets, "Dump all 
          default:
          case CMD_REQUEST_USAGE:
          {
++<<<<<<< HEAD
 +            LOG_HELP("Usage:^3 ", GetProgramCommandPrefix(), " dumpturrets [filename]");
 +            LOG_HELP("  Where 'filename' is the file to write (default is turrets_dump.cfg),");
++=======
+             LOG_HELP("Usage:^3 ", GetProgramCommandPrefix(), " dumpturrets [<filename>]");
+             LOG_HELPF("  Where <filename> is the file to write (default is %s),", DEFAULT_FILENAME);
++>>>>>>> master
              LOG_HELP("  if supplied with '-' output to console as well as default,");
              LOG_HELP("  if left blank, it will only write to default.");
              return;
Simple merge
index 479c0b6b39069c7171f51ab969415dc6840414a9,24057a0b8348209686ba56c3242df57f1889576e..c926d24c7dcb5a07b529392d2e9109f2786519aa
@@@ -82,8 -84,8 +84,13 @@@ GENERIC_COMMAND(dumpweapons, "Dump all 
          default:
          case CMD_REQUEST_USAGE:
          {
++<<<<<<< HEAD
 +            LOG_HELP("Usage:^3 ", GetProgramCommandPrefix(), " dumpweapons [filename]");
 +            LOG_HELP("  Where 'filename' is the file to write (default is weapons_dump.cfg),");
++=======
+             LOG_HELP("Usage:^3 ", GetProgramCommandPrefix(), " dumpweapons [<filename>]");
+             LOG_HELPF("  Where <filename> is the file to write (default is %s),", DEFAULT_FILENAME);
++>>>>>>> master
              LOG_HELP("  if supplied with '-' output to console as well as default,");
              LOG_HELP("  if left blank, it will only write to default.");
              return;
index 310d6959990b109b0996d8e0ef528f2945ec5854,9409819e9c15b8569fa5623ede91e841984224dc..9e7213057be91734376f0561f6ee2d2f17c5a621
@@@ -79,13 -74,12 +74,14 @@@ void W_Electro_Explode(entity this, ent
                if(IS_PLAYER(directhitentity))
                        if(DIFF_TEAM(this.realowner, directhitentity))
                                if(!IS_DEAD(directhitentity))
 -                                      if(IsFlying(directhitentity))
 -                                              Send_Notification(NOTIF_ONE, this.realowner, MSG_ANNCE, ANNCE_ACHIEVEMENT_ELECTROBITCH);
 -
 +                                      if(IsFlying(directhitentity)) {
 +                                              Give_Medal(this.realowner, ELECTROBITCH);
 +                                      }
 +      */
 +      
        this.event_damage = func_null;
        this.takedamage = DAMAGE_NO;
+       this.velocity = this.movedir; // particle fx and decals need .velocity
  
        if(this.move_movetype == MOVETYPE_BOUNCE || this.classname == "electro_orb") // TODO: classname is more reliable anyway?
        {
index a7b0533ee621e7e2c111138063e33fd686c6c494,6f4d4aebf282b6a9a596c9a0d51819543d10b678..f884b14d1a014feebc1f72b5ad77c1a163b6f666
@@@ -129,19 -129,17 +129,18 @@@ void W_Vaporizer_Attack(Weapon thiswep
        // do this now, as goodhits is disabled below
        vector v = WarpZone_UnTransformOrigin(WarpZone_trace_transform, trace_endpos);
        W_MuzzleFlash(thiswep, actor, weaponentity, w_shotorg, normalize(v - w_shotorg));
-       SendCSQCVaporizerBeamParticle(actor, damage_goodhits);
+       SendCSQCVaporizerBeamParticle(actor, impressive_hits);
  
-       if(yoda && flying) {
-               Give_Medal(actor, YODA);
-       }
-               
-       if(damage_goodhits && actor.vaporizer_lasthit)
+       if(yoda && flying)
+               Send_Notification(NOTIF_ONE, actor, MSG_ANNCE, ANNCE_ACHIEVEMENT_YODA);
+       if(impressive_hits && actor.vaporizer_lasthit)
        {
-               damage_goodhits = 0; // only every second time
+               Send_Notification(NOTIF_ONE, actor, MSG_ANNCE, ANNCE_ACHIEVEMENT_IMPRESSIVE);
 +              Give_Medal(actor, IMPRESSIVE);
+               impressive_hits = 0; // only every second time
        }
  
-       actor.vaporizer_lasthit = damage_goodhits;
+       actor.vaporizer_lasthit = impressive_hits;
  
        if(autocvar_g_rm)
        if(!(trace_dphitq3surfaceflags & (Q3SURFACEFLAG_SKY | Q3SURFACEFLAG_NOIMPACT)))
index e78a1be08ab174e9ba514bf86a26807b9d3c8578,7372fe8e1eb4b8183d925aaa45c46055b394feb9..876eaac03a25885d020f87ba460e94933ecaaa9c
@@@ -138,20 -138,18 +138,20 @@@ void W_Vortex_Attack(Weapon thiswep, en
        }
  
        yoda = 0;
-       damage_goodhits = 0;
+       impressive_hits = 0;
        FireRailgunBullet(actor, weaponentity, w_shotorg, w_shotorg + w_shotdir * max_shot_distance, mydmg, false, myforce, mymindist, mymaxdist, myhalflife, myforcehalflife, dtype);
  
 -      if(yoda && flying)
 -              Send_Notification(NOTIF_ONE, actor, MSG_ANNCE, ANNCE_ACHIEVEMENT_YODA);
 +      if(yoda && flying) {
 +              Give_Medal(actor, YODA);
 +      }
 +      
-       if(damage_goodhits && actor.vortex_lasthit)
+       if(impressive_hits && actor.vortex_lasthit)
        {
 -              Send_Notification(NOTIF_ONE, actor, MSG_ANNCE, ANNCE_ACHIEVEMENT_IMPRESSIVE);
 +              Give_Medal(actor, IMPRESSIVE);
-               damage_goodhits = 0; // only every second time
+               impressive_hits = 0; // only every second time
        }
  
-       actor.vortex_lasthit = damage_goodhits;
+       actor.vortex_lasthit = impressive_hits;
  
        //beam done on client
        vector v = WarpZone_UnTransformOrigin(WarpZone_trace_transform, trace_endpos);
@@@ -182,7 -180,7 +182,11 @@@ METHOD(Vortex, wr_aim, void(entity this
  METHOD(Vortex, wr_think, void(entity thiswep, entity actor, .entity weaponentity, int fire))
  {
      if(!WEP_CVAR(vortex, charge_always))
++<<<<<<< HEAD
 +        W_Vortex_Charge(actor, weaponentity, frametime);
++=======
+         W_Vortex_Charge(actor, weaponentity, frametime / W_TICSPERFRAME);
++>>>>>>> master
  
      if(WEP_CVAR_SEC(vortex, chargepool))
          if(actor.(weaponentity).vortex_chargepool_ammo < 1)
Simple merge
index 86f0f6d98b01b43cadcdc527bb35a50977364c33,4b50e591ebd4e5d5fd3c485e425ec19f0b2466a3..344eb7590420543cc3c35a1ac5e5dc1c2d6d2ef8
                PERSON(Zac "Mario" Jardine) \
        NL() \
        TITLE(_("Extended Team")) \
-               PERSON(AllieWay) \
                PERSON(Antonio "terencehill" Piu) \
-               PERSON(Archer) \
-               PERSON(BuddyFriendGuy) \
+               PERSON(bones_was_here) \
                PERSON(David "Cloudwalk" Knapp) \
-               PERSON(Debugger) \
-               PERSON(Diomedes) \
                PERSON(Freddy) \
-               PERSON(GATTS) \
                PERSON(Halogene) \
                PERSON(Jan "zykure" Behrens) \
-               PERSON(JH0nny) \
-               PERSON(Łukasz "kuniu the frogg" Polek) \
-               PERSON(martin-t) \
-               PERSON(Matthias "matthiaskrgr" Krüger) \
-               PERSON(Mattia "Melanosuchus" Basaglia) \
 -              PERSON(Morosophos) \
++//            PERSON(Morosophos) \
                PERSON(MrBougo) \
-               PERSON(Nick "bitbomb" Lucca) \
                PERSON(nilyt/nyov) \
                PERSON(Nitroxis) \
                PERSON(packer) \
index 7f6682ef3a771667847e0cf1e51e4808ab078d06,4cabc469798f1b74c095b94b1c94df35fe7c5414..288193e6e926fdfb28efb72f133f929b876fe452
@@@ -840,10 -829,8 +845,10 @@@ void PutClientInServer(entity this
        } else if (IS_PLAYER(this)) {
                PutPlayerInServer(this);
        }
-       
 -
 +      // send team names
 +      if(teamplay && IS_REAL_CLIENT(this))
 +              send_TeamNames(MSG_ONE, this);
+       bot_relinkplayerlist();
  }
  
  // TODO do we need all these fields, or should we stop autodetecting runtime
index 943b65ed17fb507d8ad4f1553c161ca5b239608d,43e041bf62769b30bccc58f1681af2cbac1732a0..bf9dbf9ec40eaa1afdd86230f3572ccace361b54
@@@ -414,8 -404,3 +415,9 @@@ void Join(entity this)
  #define SPECTATE_COPYFIELD(fld) SPECTATE_COPY() { this.(fld) = spectatee.(fld); }
  
  const int MAX_SPECTATORS = 7;
 +
 +float _medal_times;
 +#define Give_Medal(entity,medalname) \
 +      _medal_times = GameRules_scoring_add(entity, MEDAL_##medalname, 1); \
 +      Send_Notification(NOTIF_ONE, entity, MSG_MEDAL, MEDAL_##medalname, _medal_times);
++
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
index ef64667473bad9dd487873dbeea576c2ff1e954a,93c3835271a049b796eaab6a2ff4911ebfe7b6fd..d8163cd0e3d6326f280cef4d86905322caa91aea
@@@ -96,9 -93,9 +96,9 @@@ void round_handler_Spawn(bool() canRoun
                backtrace("Can't spawn round_handler again!");
                return;
        }
-       entity this = round_handler = new(round_handler);
+       entity this = round_handler = new_pure(round_handler);
  
 -      setthink(this, round_handler_FirstThink);
 +      
        this.canRoundStart = canRoundStart_func;
        this.canRoundEnd = canRoundEnd_func;
        this.roundStart = roundStart_func;
Simple merge
Simple merge
Simple merge
index e940555e309ca3913721a30bf308cc8e4a95fbaa,2fe010f645c0c9a2c953df6c875cf50d0351c5c2..4482fc9fdbd2142cae8387a4df8c0286b37fa2ec
@@@ -84,21 -65,7 +84,21 @@@ void accuracy_resend(entity e
  //.float hit_time;
  .float fired_time;
  
- void accuracy_add(entity this, Weapon w, int fired, int hit)
 +void roundaccuracy_clear(entity this)
 +{
 +      if (IS_INDEPENDENT_PLAYER(this)) return;
 +      entity ra = this.roundaccuracy;
 +      
 +      for (int w = 0; w <= WEP_LAST - WEP_FIRST; ++w) {
 +              ra.accuracy_frags[w] = 0;
 +              ra.accuracy_hit[w] = 0;
 +              ra.accuracy_fired[w] = 0;
 +              ra.accuracy_cnt_hit[w] = 0;
 +              ra.accuracy_cnt_fired[w] = 0;
 +      }
 +}
 +
+ void accuracy_add(entity this, Weapon w, float fired, float hit)
  {
        if (IS_INDEPENDENT_PLAYER(this)) return;
        entity a = CS(this).accuracy;
Simple merge
Simple merge
Simple merge
index a43c8dac1a98ef246b8856240405218b8569b907,bdaac8c271e5ae08f79af6ba5f32e02fa8fb717c..f965438d13f92edd8b5c7390d1b5d93bb01cad85
@@@ -48,8 -45,7 +50,9 @@@ string modname
  
  string gamemode_name;
  
 +int fragsleft;
 +int fragsleft_last;
+ string record_type;
  
  string clientstuff;