]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Merge branch 'master' into LegendaryGuard/cyber
authorLegendaryGuard <theasixchan777@gmail.com>
Mon, 12 Jul 2021 18:45:03 +0000 (20:45 +0200)
committerLegendaryGuard <theasixchan777@gmail.com>
Mon, 12 Jul 2021 18:45:03 +0000 (20:45 +0200)
29 files changed:
1  2 
qcsrc/client/hud/hud.qh
qcsrc/client/hud/panel/chat.qc
qcsrc/client/hud/panel/scoreboard.qc
qcsrc/client/main.qc
qcsrc/client/view.qc
qcsrc/common/gamemodes/gamemode/clanarena/sv_clanarena.qc
qcsrc/common/gamemodes/gamemode/ctf/sv_ctf.qc
qcsrc/common/monsters/sv_monsters.qc
qcsrc/common/mutators/mutator/_mod.inc
qcsrc/common/mutators/mutator/_mod.qh
qcsrc/common/mutators/mutator/buffs/sv_buffs.qc
qcsrc/common/mutators/mutator/instagib/sv_instagib.qc
qcsrc/common/mutators/mutator/nades/nades.qc
qcsrc/common/state.qc
qcsrc/common/stats.qh
qcsrc/common/weapons/weapon/devastator.qc
qcsrc/common/weapons/weapon/vaporizer.qc
qcsrc/common/weapons/weapon/vortex.qc
qcsrc/server/client.qc
qcsrc/server/client.qh
qcsrc/server/command/cmd.qc
qcsrc/server/command/sv_cmd.qc
qcsrc/server/damage.qc
qcsrc/server/damage.qh
qcsrc/server/items/items.qc
qcsrc/server/mutators/events.qh
qcsrc/server/weapons/common.qc
qcsrc/server/weapons/weaponsystem.qc
qcsrc/server/world.qc

Simple merge
index c87afc36c01429db31a3a90147dca988c21a3486,07de3b7dd1b9b4b586606dd1dd59432604404789..863394825e8c26beb0ade1bc2b29b7062f9ea160
@@@ -92,10 -90,11 +94,12 @@@ void HUD_Chat(
        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)
        {
-               cvar_set("con_chatrect_x", "9001"); // over 9000, we'll fake it instead for more control over alpha and such
+               vector chatsize = '1 1 0' * autocvar_con_chatsize;
+               if (cvar_string("con_chatrect_x") != "9001")
+                       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 564e39841f380c202943547cc575578f523d1884,938316bb1caa1421395a2f0d9b47f3d7babd7683..7d0979fec1f5fa98b0087cadea80cb357c0d74b2
@@@ -2028,8 -1561,10 +2029,12 @@@ vector Scoreboard_MapStats_Draw(vector 
        panel_size.x += panel_bg_padding * 2; // restore initial width
        return end_pos;
  }
 +*/
 +
+ int rankings_rows = 0;
+ int rankings_columns = 0;
+ int rankings_cnt = 0;
  vector Scoreboard_Rankings_Draw(vector pos, string ranktitle, entity pl, vector rgb, vector bg_size)
  {
        int i;
@@@ -2574,14 -2059,12 +2586,14 @@@ void Scoreboard_Draw(
                pos = Scoreboard_MakeTable(pos, tm, panel_bg_color, bg_size);
        }
  
 +      pos = Scoreboard_MedalStats_Draw(pos);
 +      
        // draw scoreboard spectators before accuracy and item stats
        if (autocvar_hud_panel_scoreboard_spectators_position == 0) {
-               pos = Scoreboard_Spectators_Draw(pos, tm, str, hud_fontsize);
+               pos = Scoreboard_Spectators_Draw(pos);
        }
  
-       // draw accuracy and item stats 
+       // draw accuracy and item stats
        if (Scoreboard_AccuracyStats_WouldDraw(pos.y))
                pos = Scoreboard_AccuracyStats_Draw(pos, panel_bg_color, bg_size);
        if (Scoreboard_ItemStats_WouldDraw(pos.y))
                        pos.y += 1.25 * hud_fontsize.y;
                }
                if(race_speedaward_alltimebest) {
-                       drawcolorcodedstring(pos, sprintf(_("All-time fastest: %d%s ^7(%s^7)"), race_speedaward_alltimebest, race_speedaward_alltimebest_unit, ColorTranslateRGB(race_speedaward_alltimebest_holder)), hud_fontsize, panel_fg_alpha, DRAWFLAG_NORMAL);
+                       drawcolorcodedstring(pos, sprintf(_("All-time fastest: %d%s ^7(%s^7)"), race_speedaward_alltimebest, unit, ColorTranslateRGB(race_speedaward_alltimebest_holder)), hud_fontsize, panel_fg_alpha, DRAWFLAG_NORMAL);
                        pos.y += 1.25 * hud_fontsize.y;
                }
+               if (race_speedaward || race_speedaward_alltimebest)
+                       pos.y += 0.25 * hud_fontsize.y;
                pos = Scoreboard_Rankings_Draw(pos, ranktitle, playerslots[player_localnum], panel_bg_color, bg_size);
        }
+       else
+               rankings_cnt = 0;
  
 +      // List spectators
 +      for(pl = players.sort_next; pl; pl = pl.sort_next)
 +      {
 +              if(pl.team == NUM_SPECTATOR)
 +              {
 +                      for(tm = teams.sort_next; tm; tm = tm.sort_next)
 +                              if(tm.team == NUM_SPECTATOR)
 +                                      break;
 +                      str = sprintf("%s (%d)", _("Spectators"), tm.team_size);
 +                      draw_beginBoldFont();
 +                      drawstring(pos, str, hud_fontsize, '1 1 1', panel_fg_alpha, DRAWFLAG_NORMAL);
 +                      draw_endBoldFont();
 +                      pos.y += 1.25 * hud_fontsize.y;
 +
 +                      break;
 +              }
 +      }
 +
        // draw scoreboard spectators after rankings
        if (autocvar_hud_panel_scoreboard_spectators_position == 2) {
-               pos = Scoreboard_Spectators_Draw(pos, tm, str, hud_fontsize);
+               pos = Scoreboard_Spectators_Draw(pos);
        }
  
 -      pos = Scoreboard_MapStats_Draw(pos, panel_bg_color, bg_size);
 +      //pos = Scoreboard_MapStats_Draw(pos, panel_bg_color, bg_size);
  
        // draw scoreboard spectators after mapstats
        if (autocvar_hud_panel_scoreboard_spectators_position == 3) {
Simple merge
Simple merge
Simple merge
Simple merge
index 61f9a08fc873389def811089e72e673273499015,11176f48f3846271812ef8174358dc7940cbed1c..1dd1d1fe28387ece76711293fd1744ff65aa77cb
@@@ -256,10 -325,10 +325,10 @@@ void buff_Think(entity this
                                WaypointSprite_UpdateBuildFinished(this.buff_waypoint, time + this.buff_activetime - frametime);
                }
  
-               this.oldbuffs = STAT(BUFFS, this);
+               this.oldbuffs = this.buffdef;
        }
  
 -      if(!game_stopped)
 +      if(!game_stopped && !game_timeout)
        if((round_handler_IsActive() && round_handler_IsRoundStarted()) || time >= game_starttime)
        if(!this.buff_activetime_updated)
        {
@@@ -628,10 -809,10 +809,10 @@@ MUTATOR_HOOKFUNCTION(buffs, PlayerUseKe
  
  MUTATOR_HOOKFUNCTION(buffs, ForbidThrowCurrentWeapon)
  {
 -      if(MUTATOR_RETURNVALUE || game_stopped) return;
 +      if(MUTATOR_RETURNVALUE || game_stopped || game_timeout) return;
        entity player = M_ARGV(0, entity);
  
-       if(STAT(BUFFS, player) & BUFF_SWAPPER.m_itemid)
+       if(StatusEffects_active(BUFF_SWAPPER, player))
        {
                float best_distance = autocvar_g_buffs_swapper_range;
                entity closest = NULL;
index 459e483308c266e7a712feebbd69b12708da7ac0,04c61a6d73c5e8cf23c135e780372cb892d6a74e..2d72bf4ca4654d955d6e831f2c7950aa649fc6da
@@@ -1796,10 -1138,9 +1796,10 @@@ void nade_prime(entity this
        this.fake_nade = NULL;
  
        int ntype;
 +      int tntype = this.tandemnade_type;
        string pntype = this.pokenade_type;
  
-       if((this.items & ITEM_Strength.m_itemid) && autocvar_g_nades_bonus_onstrength)
+       if(StatusEffects_active(STATUSEFFECT_Strength, this) && autocvar_g_nades_bonus_onstrength)
                ntype = STAT(NADE_BONUS_TYPE, this);
        else if (STAT(NADE_BONUS, this) >= 1)
        {
Simple merge
index 40f09290ee924853e9cda8beea78ad2ed3bd268d,12879a7531b1acd3f6bff24b18654d54bd1569cb..04f1b35a510c10a3500dde73824a5dde27223e05
@@@ -73,14 -77,6 +77,13 @@@ 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
- bool autocvar_g_allow_oldvortexbeam;
 +float overtime_starttime; // z411 point in time where first overtime started
 +
 +float checkrules_overtimesadded; // z411 add
 +float timeout_last;
 +float timeout_total_time;
 +bool game_timeout;
 +
  int autocvar_leadlimit;
  // TODO: world.qh can't be included here due to circular includes!
  #define autocvar_fraglimit cvar("fraglimit")
  #endif
  REGISTER_STAT(WEAPONRATEFACTOR, float, W_WeaponRateFactor(this))
  REGISTER_STAT(GAME_STOPPED, int, game_stopped)
 +
 +REGISTER_STAT(TIMEOUT_LAST, float, timeout_last)
 +
  REGISTER_STAT(GAMESTARTTIME, float, game_starttime)
- REGISTER_STAT(STRENGTH_FINISHED, float)
- REGISTER_STAT(INVINCIBLE_FINISHED, float)
  /** arc heat in [0,1] */
  REGISTER_STAT(PRESSED_KEYS, int)
- /** this stat could later contain some other bits of info, like, more server-side particle config */
- REGISTER_STAT(ALLOW_OLDVORTEXBEAM, bool, autocvar_g_allow_oldvortexbeam)
  REGISTER_STAT(FUEL, int)
  REGISTER_STAT(NB_METERSTART, float)
  /** compressShotOrigin */
@@@ -123,15 -111,12 +121,14 @@@ 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(BUFFS, int)
  REGISTER_STAT(NADE_BONUS, float)
  REGISTER_STAT(NADE_BONUS_TYPE, int)
  REGISTER_STAT(NADE_BONUS_SCORE, float)
Simple merge
index 1d1a9b3d4e4c2333b4e6cc9feaad2d24330d8885,a9758146f5dddfaca618b7ddc6b6a624fa7da1ef..6c6479c7ebddd7a83a139bdcc52256ff14f1f205
@@@ -1071,21 -1044,15 +1066,17 @@@ string getwelcomemessage(entity this
                modifications = strcat(modifications, ", Weapons stay");
        if(autocvar_g_jetpack)
                modifications = strcat(modifications, ", Jet pack");
-       if(autocvar_g_powerups == 0)
-               modifications = strcat(modifications, ", No powerups");
-       if(autocvar_g_powerups > 0)
-               modifications = strcat(modifications, ", Powerups");
        modifications = substring(modifications, 2, strlen(modifications) - 2);
  
 -      string versionmessage = GetClientVersionMessage(this);
 -      string s = strcat(versionmessage, "^8\n^8\nserver is ^9", autocvar_hostname, "^8\n");
 +      //string versionmessage = GetClientVersionMessage(this);
 +      //string s = strcat(versionmessage, "^8\n^9", (autocvar_hostname_full ? autocvar_hostname_full : autocvar_hostname));
 +      //string s = strcat(versionmessage, "^8\n^8\nserver is ^9", autocvar_hostname, "^8\n");
 +      string s = (autocvar_hostname_full != "" ? autocvar_hostname_full : autocvar_hostname);
  
 -      s = strcat(s, "^8\nmatch type is ^1", gamemode_name, "^8\n");
 +      s = strcat(s, "^8\n^7", gamemode_name);
  
        if(modifications != "")
 -              s = strcat(s, "^8\nactive modifications: ^3", modifications, "^8\n");
 +              s = strcat(s, "^7 | ^3", modifications);
  
        if(cache_lastmutatormsg != autocvar_g_mutatormsg)
        {
Simple merge
index b433508a5678badc6d0c1cbdf2548b2ba2d690f4,a8a8747e1822558f0b3c572b58a5d105b7d4c773..961059738ebbb77c0df20769e5cc1c1dd91541cb
@@@ -836,9 -815,8 +836,9 @@@ void ClientCommand_(entity caller, int 
        CLIENT_COMMAND("say_team", ClientCommand_say_team(ent, request, arguments, command), "Print a message to chat to all team mates") \
        CLIENT_COMMAND("selectteam", ClientCommand_selectteam(ent, request, arguments), "Attempt to choose a team to join into") \
        CLIENT_COMMAND("selfstuff", ClientCommand_selfstuff(ent, request, command), "Stuffcmd a command to your own client") \
-       CLIENT_COMMAND("sentcvar", ClientCommand_sentcvar(ent, request, arguments, command), "New system for sending a client cvar to the server") \
+       CLIENT_COMMAND("sentcvar", ClientCommand_sentcvar(ent, request, arguments), "New system for sending a client cvar to the server") \
        CLIENT_COMMAND("spectate", ClientCommand_spectate(ent, request), "Become an observer") \
 +      CLIENT_COMMAND("sounds", ClientCommand_sounds(ent, request), "Get list of commsnds") \
        CLIENT_COMMAND("suggestmap", ClientCommand_suggestmap(ent, request, arguments), "Suggest a map to the mapvote at match end") \
        CLIENT_COMMAND("tell", ClientCommand_tell(ent, request, arguments, command), "Send a message directly to a player") \
        CLIENT_COMMAND("voice", ClientCommand_voice(ent, request, arguments, command), "Send voice message via sound") \
Simple merge
index 0db161be6c53ddf7aa2a4a1013b846691091e437,d480c229b9b244024d6efae2e81eccb30657657e..4133b4d73bffbb4f0179381a652e79c4423e15c5
@@@ -445,10 -413,10 +443,10 @@@ void Obituary(entity attacker, entity i
  
                        int f3 = 0;
                        if(deathtype == DEATH_BUFF.m_id)
-                               f3 = buff_FirstFromFlags(STAT(BUFFS, attacker)).m_id;
+                               f3 = buff_FirstFromFlags(attacker).m_id;
  
 -                      if (!Obituary_WeaponDeath(targ, true, deathtype, targ.netname, attacker_name, deathlocation, CS(targ).killcount, kill_count_to_attacker))
 -                              Obituary_SpecialDeath(targ, true, deathtype, targ.netname, attacker_name, deathlocation, CS(targ).killcount, kill_count_to_attacker, f3);
 +                      if (!Obituary_WeaponDeath(targ, attacker, true, deathtype, playername(targ.netname, targ.team, true), playername(attacker_name, attacker.team, true), deathlocation, CS(targ).killcount, kill_count_to_attacker))
 +                              Obituary_SpecialDeath(targ, attacker, true, deathtype, playername(targ.netname, targ.team, true), playername(attacker_name, attacker.team, true), deathlocation, CS(targ).killcount, kill_count_to_attacker, f3);
                }
        }
  
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge