]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Merge branch 'master' into terencehill/centerprint_stuff
authorterencehill <piuntn@gmail.com>
Sat, 16 Jul 2011 20:37:21 +0000 (22:37 +0200)
committerterencehill <piuntn@gmail.com>
Sat, 16 Jul 2011 20:37:21 +0000 (22:37 +0200)
14 files changed:
1  2 
defaultXonotic.cfg
qcsrc/client/Main.qc
qcsrc/client/View.qc
qcsrc/client/autocvars.qh
qcsrc/client/hud.qh
qcsrc/client/main.qh
qcsrc/client/miscfunctions.qc
qcsrc/client/scoreboard.qc
qcsrc/common/constants.qh
qcsrc/server/ctf.qc
qcsrc/server/defs.qh
qcsrc/server/mutators/gamemode_keepaway.qc
qcsrc/server/t_items.qc
qcsrc/server/w_minstanex.qc

diff --combined defaultXonotic.cfg
index 31b84a3decb4271470933182a1151532f345ef92,27ab53efc715dd34111bd703be3353ca0b36fe46..0db263b247f268c8a4f7ec943917548d0a08b223
@@@ -899,6 -899,7 +899,7 @@@ set g_multijump_add 0      "0 = make the cur
  set g_multijump_speed -999999 "Minimum vertical speed a player must have in order to jump again"
  
  // effects
+ r_glsl_vertextextureblend_usebothalphas 1 // allows to abuse texture blending as detail texture
  r_glsl_postprocess 1
  r_picmipsprites 0 // Xonotic uses sprites that should never be picmipped (team mate, typing, waypoints)
  r_picmipworld 1
@@@ -1245,6 -1246,10 +1246,10 @@@ seta g_waypointsprite_alpha 1 "This all
  seta g_waypointsprite_edgefadealpha 0.5 "alpha multiplier near the edge"
  seta g_waypointsprite_edgefadescale 1 "scale multiplier near the edge"
  seta g_waypointsprite_edgefadedistance 50 "distance in virtual pixels from edge where to start fading"
+ seta g_waypointsprite_edgeoffset_bottom 0 "offset of how close the waypoint can be to the bottom edge of the screen"
+ seta g_waypointsprite_edgeoffset_left 0 "offset of how close the waypoint can be to the left edge of the screen"
+ seta g_waypointsprite_edgeoffset_right 0 "offset of how close the waypoint can be to the right edge of the screen"
+ seta g_waypointsprite_edgeoffset_top 0 "offset of how close the waypoint can be to the top edge of the screen"
  seta g_waypointsprite_crosshairfadealpha 0.25 "alpha multiplier near crosshair"
  seta g_waypointsprite_crosshairfadescale 1 "scale multiplier near the crosshair"
  seta g_waypointsprite_crosshairfadedistance 150 "distance in virtual pixels from crosshair where to start fading"
@@@ -1679,6 -1684,7 +1684,6 @@@ set capturelimit 
  
  // hud: font size
  seta hud_fontsize 11
 -seta scr_centersize 12
  seta hud_width 560
  
  // these entities are not referenced by anything directly, they just represent
diff --combined qcsrc/client/Main.qc
index d4d1948d4cd88b5413e57cac46a64d2f3e61de4f,95a01ab0e767501ac9b257ff2b266536dbe893cf..6d90e1080363324f89edd644f2f4d20ad1c1ebee
@@@ -827,8 -827,6 +827,6 @@@ void Ent_ClientData(
  
        if(newspectatee_status != spectatee_status)
        {
-               float i;
                // clear race stuff
                race_laptime = 0;
                race_checkpointtime = 0;
@@@ -1330,17 -1328,6 +1328,17 @@@ void Net_Notify() 
        {
                HUD_Centerprint(ReadString(), ReadString(), ReadShort(), ReadByte());
        }
 +      else if(type == CSQC_CENTERPRINT_GENERIC)
 +      {
 +              float id;
 +              string s;
 +              id = ReadByte();
 +              s = ReadString();
 +              if (id != 0 && s != "")
 +                      centerprint_generic(id, s, ReadByte(), ReadByte());
 +              else
 +                      centerprint_generic(id, s, 0, 0);
 +      }
  }
  
  void Net_WeaponComplain() {
diff --combined qcsrc/client/View.qc
index 986a338e402368268c5edb8cfe406013f8f1be8e,48566db5739ae1d9b43e401a16613d71aa6edc7d..476991137586a62dec20cce20dbb33173857100e
@@@ -1,7 -1,5 +1,5 @@@
  entity porto;
  vector polyline[16];
- float trace_dphitcontents;
- float trace_networkentity;
  float Q3SURFACEFLAG_SLICK = 2; // low friction surface
  float DPCONTENTS_SOLID = 1; // blocks player movement
  float DPCONTENTS_BODY = 32; // blocks player movement
@@@ -1421,12 -1419,24 +1419,12 @@@ void CSQC_common_hud(void
      HUD_DrawScoreboard();
  
      if (scoreboard_active) // scoreboard/accuracy
 -    {
          HUD_Reset();
 -        // HUD_DrawScoreboard takes care of centerprint_start
 -    }
      else if (intermission == 2) // map voting screen
      {
          HUD_FinaleOverlay();
          HUD_Reset();
 -
 -        centerprint_start_x = 0;
 -        centerprint_start_y = autocvar_scr_centerpos * vid_conheight;
 -    }
 -    else // hud
 -    {
 -        centerprint_start_x = 0;
 -        centerprint_start_y = autocvar_scr_centerpos * vid_conheight;
      }
 -
        /*
        switch(hud)
        {
              break;
        }
        */
 -      
 -    HUD_DrawCenterPrint();
 -    
  }
  
  
index 25bda99c02cf7281a353405b5202467a7bd2e25a,8e60d8212fef8f1c6bd8996694c4f54518057320..b1c2cda1b5f9d00eb543b1fa27aa78f108138fc4
@@@ -134,6 -134,10 +134,10 @@@ var float autocvar_g_waypointsprite_dis
  var float autocvar_g_waypointsprite_edgefadealpha = 1;
  float autocvar_g_waypointsprite_edgefadedistance;
  var float autocvar_g_waypointsprite_edgefadescale = 1;
+ var float autocvar_g_waypointsprite_edgeoffset_bottom = 0;
+ var float autocvar_g_waypointsprite_edgeoffset_left = 0;
+ var float autocvar_g_waypointsprite_edgeoffset_right = 0;
+ var float autocvar_g_waypointsprite_edgeoffset_top = 0;
  float autocvar_g_waypointsprite_minalpha;
  float autocvar_g_waypointsprite_minscale;
  float autocvar_g_waypointsprite_normdistance;
@@@ -215,12 -219,6 +219,12 @@@ float autocvar_hud_panel_healtharmor_pr
  float autocvar_hud_panel_healtharmor_progressbar_gfx_lowhealth;
  float autocvar_hud_panel_healtharmor_progressbar_gfx_smooth;
  
 +float autocvar_hud_panel_centerprint;
 +float autocvar_hud_panel_centerprint_align;
 +float autocvar_hud_panel_centerprint_fadetime;
 +float autocvar_hud_panel_centerprint_flip;
 +float autocvar_hud_panel_centerprint_fontscale;
 +float autocvar_hud_panel_centerprint_time;
  float autocvar_hud_panel_healtharmor_text;
  float autocvar_hud_panel_infomessages;
  float autocvar_hud_panel_infomessages_flip;
@@@ -335,6 -333,9 +339,6 @@@ var float autocvar_scoreboard_highlight
  var float autocvar_scoreboard_highlight_alpha_self = 0.25;
  float autocvar_scoreboard_offset_left;
  float autocvar_scoreboard_offset_right;
 -float autocvar_scr_centerpos;
 -float autocvar_scr_centersize;
 -float autocvar_scr_centertime;
  float autocvar_v_flipped;
  float autocvar_vid_conheight;
  float autocvar_vid_conwidth;
diff --combined qcsrc/client/hud.qh
index 53b920ede596caa81fb98121a6cbb879e365a9f4,fc3dd7422183fddc9aa1dc283bed76ff59529893..ca9296799e8ecb6134645387c1e66fcaf1267859
@@@ -1,5 -1,7 +1,5 @@@
  float log(float f);
  
 -vector centerprint_start;
 -
  float panel_order[HUD_PANEL_NUM];
  string hud_panelorder_prev;
  
@@@ -154,14 -156,6 +154,14 @@@ if(panel_bg_color_team_str == "") {
        panel_bg_color_team = stof(panel_bg_color_team_str);\
  }
  
 +// the check doesn't allow to fade this panel when showing the panel-specific menu dialog
 +#define HUD_Panel_ApplyFadeAlpha()\
 +if(!(menu_enabled == 2 && highlightedPanel == hud_configure_active_panel))\
 +{\
 +      panel_bg_alpha *= hud_fade_alpha;\
 +      panel_fg_alpha *= hud_fade_alpha;\
 +} ENDS_WITH_CURLY_BRACE
 +
  // Get value for panel_bg_alpha: if "" fetch default, else use panel_bg_alpha. Also do various menu dialog fadeout/in checks, and minalpha checks
  // comment on line 3 of macro: // do not set a minalpha cap when showing the config dialog for this panel
  #define HUD_Panel_GetBgAlpha()\
@@@ -176,14 -170,19 +176,14 @@@ if(autocvar__hud_configure) {
                panel_bg_alpha = (1 - autocvar__menu_alpha) * max(cvar("hud_configure_bg_minalpha"), panel_bg_alpha) + autocvar__menu_alpha * panel_bg_alpha;\
        else\
                panel_bg_alpha = max(cvar("hud_configure_bg_minalpha"), panel_bg_alpha);\
 -} if(!(menu_enabled == 2 && highlightedPanel == hud_configure_active_panel)) {\
 -      panel_bg_alpha *= hud_fade_alpha;\
  }
  
  // Get value for panel_fg_alpha. Also do various minalpha checks
  // comment on line 2 of macro: // ALWAYS show disabled panels at 0.25 alpha when in config mode
 -// comment on line 4 of macro: // don't fade this panel when showing the panel-specific menu dialog
  #define HUD_Panel_GetFgAlpha()\
  panel_fg_alpha = autocvar_hud_panel_fg_alpha;\
  if(autocvar__hud_configure && !panel_enabled)\
        panel_fg_alpha = 0.25;\
 -if(!(menu_enabled == 2 && highlightedPanel == hud_configure_active_panel))\
 -      panel_fg_alpha *= hud_fade_alpha;
  
  // Get border. See comments above, it's similar.
  #define HUD_Panel_GetBorder()\
@@@ -233,7 -232,7 +233,7 @@@ else
  panel_pos = (1 - autocvar__menu_alpha) * panel_pos + (autocvar__menu_alpha) * menu_enable_panelpos;
  
  // return smoothly faded size of given panel when a dialog is active
- //var vector menu_enable_maxsize; FTEQCC_YOU_SUCK_THIS_IS_NOT_UNREFERENCED(menu_enable_maxsize);
+ //var vector menu_enable_maxsize;
  var float menu_enable_maxsize_x;
  var float menu_enable_maxsize_y;
  var vector menu_enable_size;
@@@ -284,7 -283,6 +284,7 @@@ if(menu_enabled == 2 && hud_configure_a
  switch(id) { \
        case HUD_PANEL_INFOMESSAGES: HUD_Panel_UpdateCvars(infomessages) break; \
        case HUD_PANEL_PHYSICS: HUD_Panel_UpdateCvars(physics); break;\
 +      case HUD_PANEL_CENTERPRINT: HUD_Panel_UpdateCvars(centerprint); break;\
  }
  
  #define HUD_Panel_UpdateCvarsForId(id) \
@@@ -322,7 -320,6 +322,7 @@@ HUD_Panel_GetBorder(
  switch(id) { \
        case HUD_PANEL_INFOMESSAGES: HUD_Panel_UpdatePosSize(infomessages) break;\
        case HUD_PANEL_PHYSICS: HUD_Panel_UpdatePosSize(physics); break;\
 +      case HUD_PANEL_CENTERPRINT: HUD_Panel_UpdatePosSize(centerprint); break;\
  }
  
  #define HUD_Panel_UpdatePosSizeForId(id) \
diff --combined qcsrc/client/main.qh
index 62475f9fb1f6bd33b8c01bd1fe7880344bd229a1,a0634d42c981244604f5a913051fe74e46af9e3c..64399b20a3e035e6ad899978225cdfadb44a581d
@@@ -86,8 -86,8 +86,8 @@@ string scores_label[MAX_SCORE]
  float scores_flags[MAX_SCORE];
  string teamscores_label[MAX_SCORE];
  float teamscores_flags[MAX_SCORE];
- .float scores[MAX_SCORE]; FTEQCC_YOU_SUCK_THIS_IS_NOT_UNREFERENCED(scores);
- .float teamscores[MAX_TEAMSCORE]; FTEQCC_YOU_SUCK_THIS_IS_NOT_UNREFERENCED(teamscores);
+ .float scores[MAX_SCORE];
+ .float teamscores[MAX_TEAMSCORE];
  
  #define IS_INCREASING(x) ( (x)&SFL_LOWER_IS_BETTER )
  #define IS_DECREASING(x) ( !((x)&SFL_LOWER_IS_BETTER) )
@@@ -144,7 -144,6 +144,7 @@@ float camera_roll
  vector camera_direction;
  
  void centerprint(string strMessage);
 +void centerprint_generic(float new_id, string strMessage, float duration, float countdown_num);
  
  #define ALPHA_MIN_VISIBLE 0.003
  
index 77f40992590ba0d6a780ac31f3734165755e21c4,0ba6097701ebe85295efa9179652aa92f42bf0aa..7301fbf0bbf2922fa30b14f83c487e770239da5e
@@@ -20,7 -20,7 +20,7 @@@ void restartAnnouncer_Think() 
        countdown_rounded = floor(0.5 + countdown);
        if(countdown <= 0) {
                if (!spectatee_status) //do cprint only for players
 -                      centerprint(_("^1Begin!"));
 +                      centerprint_generic(CPID_GAME_STARTING, _("^1Begin!"), 1, 0);
  
                sound(world, CH_INFO, strcat("announcer/", autocvar_cl_announcer, "/begin.wav"), VOL_BASEVOICE, ATTN_NONE);
                //reset maptime announcers now as well
@@@ -31,7 -31,7 +31,7 @@@
        }
        else {
                if (!spectatee_status) //do cprint only for players
 -                      centerprint(sprintf(_("^1Game starts in %d seconds"), countdown_rounded));
 +                      centerprint_generic(CPID_GAME_STARTING, _("^1Game starts in %d seconds"), 1, countdown_rounded);
  
                if(countdown_rounded <= 3 && countdown_rounded >= 1) {
                        sound(world, CH_INFO, strcat("announcer/", autocvar_cl_announcer, "/", ftos(countdown_rounded), ".wav"), VOL_BASEVOICE, ATTN_NONE);
@@@ -319,9 -319,6 +319,6 @@@ vector HUD_GetFontsize(string cvarname
  
  float PreviewExists(string name)
  {
-       float f;
-       string file;
        if(autocvar_cl_readpicture_force)
                return false;
  
index 2d32083d311f51e49cbe635e35ffb0787311b889,67b7f746c8d43f0b2711ff6f655d1ca22d5a88c9..93f851876da157a0a229127cfdf8cac4111272b9
@@@ -981,7 -981,7 +981,7 @@@ vector HUD_DrawScoreboardAccuracyStats(
        if(getstati(STAT_SWITCHWEAPON) == WEP_MINSTANEX)
                g_minstagib = 1; // TODO: real detection for minstagib?
  
-       float weapon_stats, weapon_number;
+       float weapon_stats;
  
        if (!acc_levels)
                rgb = '1 1 1';
@@@ -1168,6 -1168,9 +1168,6 @@@ void HUD_DrawScoreboard(
        vector sb_heading_fontsize;
        sb_heading_fontsize = hud_fontsize * 2;
        drawstring(pos, _("Scoreboard"), sb_heading_fontsize, '1 1 1', scoreboard_alpha_fg, DRAWFLAG_NORMAL);
 -      
 -      centerprint_start_x = vid_conwidth - 0.5 * (pos_x + stringwidth(_("Scoreboard"), FALSE, sb_heading_fontsize));
 -      centerprint_start_y = pos_y;
  
        pos_y += sb_heading_fontsize_y + hud_fontsize_y * 0.25;
  
index fe368caa0ac9b7361943828ab7227a01f458956d,e253ee5c71a3b5f32318edc47d17185449ea4f85..de486577bd022513c06ec886552e9287459a72bb
@@@ -83,7 -83,6 +83,7 @@@ const float RANKINGS_CNT = 15
  
  const float CSQC_KILLNOTIFY = 0;
  const float CSQC_CENTERPRINT = 1;
 +const float CSQC_CENTERPRINT_GENERIC = 2;
  
  const float ENT_CLIENT = 0;
  const float ENT_CLIENT_DEAD = 1;
@@@ -434,11 -433,12 +434,12 @@@ const float STAT_DOM_PPS_YELLOW = 104
  float CH_INFO = 0; // only on world and csqc
  float CH_TRIGGER = 0; // only on players; compat: FALSELY CONTROLLED BY "Info"
  float CH_WEAPON_A = 1; // only on players and entities
- float CH_WEAPON_SINGLE = 1; // only on players and entities
+ float CH_WEAPON_SINGLE = 5; // only on players and entities
  float CH_VOICE = 2; // only on players
  float CH_BGM_SINGLE = 2; // only on csqc; compat: FALSELY CONTROLLED BY "Voice"
  float CH_AMBIENT = 2; // only on csqc; compat: FALSELY CONTROLLED BY "Voice"
  float CH_TRIGGER_SINGLE = 3; // only on players, entities, csqc
+ float CH_SHOTS = 4; // only on players, entities, csqc
  float CH_SHOTS_SINGLE = 4; // only on players, entities, csqc
  float CH_WEAPON_B = 5; // only on players and entities
  float CH_PAIN = 6; // only on players and csqc
@@@ -453,6 -453,7 +454,7 @@@ float CH_VOICE = -2
  float CH_BGM_SINGLE = 8;
  float CH_AMBIENT = -9;
  float CH_TRIGGER_SINGLE = 3;
+ float CH_SHOTS = -4;
  float CH_SHOTS_SINGLE = 4;
  float CH_WEAPON_B = -1;
  float CH_PAIN = -6;
@@@ -592,6 -593,9 +594,6 @@@ float HITTYPE_RESERVED = 0x1000; // unu
  #define FRAGS_PLAYER_NONSOLID -616
  // we can use this frags value for both
  
 -//misc. stuff
 -#define NEWLINES "\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n"
 -
  // water levels
  float WATERLEVEL_NONE = 0;
  float WATERLEVEL_WETFEET = 1;
@@@ -600,18 -604,6 +602,18 @@@ float WATERLEVEL_SUBMERGED = 3
  
  float MAX_SHOT_DISTANCE = 32768;
  
 +//centerprint ID list
 +float CPID_TEAMCHANGE = 1;
 +float CPID_CTF_CAPTURESHIELD = 2;
 +float CPID_MINSTA_FINDAMMO = 3;
 +float CPID_NIX_WPNCHANGE = 4;
 +float CPID_DISCONNECT_IDLING = 5;
 +float CPID_ROUND_STARTING = 6;
 +float CPID_GAME_STARTING = 7;
 +float CPID_TIMEOUT_COUNTDOWN = 8;
 +float CPID_MOTD = 9;
 +float CPID_KH_MSG = 10;
 +
  // CSQC centerprint/notify message types
  float MSG_SUICIDE = 0;
  float MSG_KILL = 1;
@@@ -686,8 -678,7 +688,8 @@@ float HUD_PANEL_CHAT               = 12
  float HUD_PANEL_ENGINEINFO    = 13;
  float HUD_PANEL_INFOMESSAGES  = 14;
  float HUD_PANEL_PHYSICS       = 15;
 -float HUD_PANEL_NUM           = 16; // always last panel id + 1, please increment when adding a new panel
 +float HUD_PANEL_CENTERPRINT   = 16;
 +float HUD_PANEL_NUM           = 17; // always last panel id + 1, please increment when adding a new panel
  
  string HUD_PANELNAME_WEAPONS          = "weapons";
  string HUD_PANELNAME_AMMO             = "ammo";
@@@ -705,7 -696,6 +707,7 @@@ string HUD_PANELNAME_CHAT          = "chat"
  string HUD_PANELNAME_ENGINEINFO               = "engineinfo";
  string HUD_PANELNAME_INFOMESSAGES     = "infomessages";
  string HUD_PANELNAME_PHYSICS  = "physics";
 +string HUD_PANELNAME_CENTERPRINT      = "centerprint";
  
  float HUD_MENU_ENABLE         = 0;
  
diff --combined qcsrc/server/ctf.qc
index 8e93ab44a1aa13a6b7a5c994b409142277b27b34,a54ee6a8ac68ced40bc09fa337f0a80cf1dddcf0..0232c42f70d0002663e45a8e34f5fb2a904bf67c
@@@ -66,12 -66,12 +66,12 @@@ void ctf_captureshield_update(entity p
                {
                        if(should)
                        {
 -                              centerprint_atprio(p, CENTERPRIO_SHIELDING, "^3You are now ^4shielded^3 from the flag\n^3for ^1too many unsuccessful attempts^3 to capture.\n\n^3Make some defensive scores before trying again.");
 +                              Send_CSQC_Centerprint_Generic(other, CPID_CTF_CAPTURESHIELD, "^3You are ^4shielded^3 from the flag\n^3for ^1too many unsuccessful attempts^3 to capture.\n\n^3Get some defensive scores before trying again.", 5, 0);
                                // TODO csqc notifier for this
                        }
                        else
                        {
 -                              centerprint_atprio(p, CENTERPRIO_SHIELDING, "^3You are now free.\n\n^3Feel free to ^1try to capture^3 the flag again\n^3if you think you will succeed.");
 +                              Send_CSQC_Centerprint_Generic(p, CPID_CTF_CAPTURESHIELD, "^3You are now free.\n\n^3Feel free to ^1try to capture^3 the flag again\n^3if you think you will succeed.", 5, 0);
                                // TODO csqc notifier for this
                        }
                        p.ctf_captureshielded = should;
@@@ -88,7 -88,6 +88,7 @@@ float ctf_captureshield_customize(
        return TRUE;
  }
  
 +.float ctf_captureshield_touch_msgtime;
  void ctf_captureshield_touch()
  {
        if not(other.ctf_captureshielded)
        mymid = (self.absmin + self.absmax) * 0.5;
        othermid = (other.absmin + other.absmax) * 0.5;
        Damage(other, self, self, 0, DEATH_HURTTRIGGER, mymid, normalize(othermid - mymid) * captureshield_force);
 -      centerprint_atprio(other, CENTERPRIO_SHIELDING, "^3You are ^4shielded^3 from the flag\n^3for ^1too many unsuccessful attempts^3 to capture.\n\n^3Get some defensive scores before trying again.");
 +      if (time - other.ctf_captureshield_touch_msgtime > 2)
 +              Send_CSQC_Centerprint_Generic(other, CPID_CTF_CAPTURESHIELD, "^3You are ^4shielded^3 from the flag\n^3for ^1too many unsuccessful attempts^3 to capture.\n\n^3Get some defensive scores before trying again.", 5, 0);
 +      other.ctf_captureshield_touch_msgtime = time;
  }
  
  void ctf_flag_spawnstuff()
@@@ -361,7 -358,7 +361,7 @@@ void FlagThink(
                {
                        bprint("The ", self.netname, " became impatient after ", ftos_decimals(flagcaptimerecord, 2), " seconds and returned itself\n");
  
-                       sound (self, CH_TRIGGER_SINGLE, self.noise3, VOL_BASE, ATTN_NONE);
+                       sound (self, CH_TRIGGER, self.noise3, VOL_BASE, ATTN_NONE);
                        self.owner.impulse = 141; // returning!
  
                        e = self;
                if (time > self.pain_finished)
                {
                        bprint("The ", self.netname, " has returned to base\n");
-                       sound (self, CH_TRIGGER_SINGLE, self.noise3, VOL_BASE, ATTN_NONE);
+                       sound (self, CH_TRIGGER, self.noise3, VOL_BASE, ATTN_NONE);
                        LogCTF("returned", self.team, world);
                        ReturnFlag(self);
                }
diff --combined qcsrc/server/defs.qh
index 87ff757a9e42434669043f42c92511bf2d60cb78,2e8ba3d698064524db892edbc3145e981e3fc889..9e6a73b5e3642fe9e9ae952a9b6a318120e32ad7
@@@ -231,6 -231,7 +231,6 @@@ void weapon_defaultspawnfunc(float wpn)
  
  string w_deathtypestring;
  
 -void(entity client, string s) centerprint_builtin = #73;
  .vector dest1, dest2;
  
  float gameover;
@@@ -242,6 -243,7 +242,6 @@@ float alreadychangedlevel
  .float runes;
  
  
 -.float welcomemessage_time;
  .float version;
  
  // minstagib vars
@@@ -284,6 -286,7 +284,6 @@@ entity timeoutHandler; //responsible fo
  void timeoutHandler_Think();
  void evaluateTimeout();
  void evaluateTimein();
 -string getTimeoutText(float addOneSecond);
  
  .float spawnshieldtime;
  
@@@ -309,6 -312,7 +309,6 @@@ float default_weapon_alpha
  .float() customizeentityforclient;
  .float cvar_cl_handicap;
  .float cvar_cl_playerdetailreduction;
 -.float cvar_scr_centertime;
  .string cvar_g_xonoticversion;
  .string cvar_cl_weaponpriority;
  .string cvar_cl_weaponpriorities[10];
@@@ -364,6 -368,10 +364,6 @@@ void FixClientCvars(entity e)
  
  float weaponsInMap;
  
 -void centerprint_atprio(entity e, float prio, string s);
 -void centerprint_expire(entity e, float prio);
 -void centerprint(entity e, string s);
 -
  .float respawn_countdown; // next number to count
  
  float bot_waypoints_for_items;
@@@ -597,7 -605,7 +597,7 @@@ float client_cefc_accumulatortime
  
  ..float current_ammo;
  
- .float weapon_load[WEP_MAXCOUNT]; FTEQCC_YOU_SUCK_THIS_IS_NOT_UNREFERENCED(weapon_load);
+ .float weapon_load[WEP_MAXCOUNT];
  .float ammo_none; // used by the reloading system, must always be 0
  .float clip_load;
  .float old_clip_load;
index 4b937dba2fe189594e4521ea9b28b802cbcc8192,e71c2d7ef6ecd20f04faa06627c041f7673ed225..8d3511eceda0750e74266d5649133b69f9c15e84
@@@ -78,7 -78,7 +78,7 @@@ void ka_RespawnBall() // runs whenever 
                WaypointSprite_Spawn("ka-ball", 0, 0, self, '0 0 64', world, self.team, self, waypointsprite_attachedforcarrier, FALSE, RADARICON_FLAGCARRIER, '0 1 1');
                WaypointSprite_Ping(self.waypointsprite_attachedforcarrier);    
  
-               sound(self, CH_TRIGGER_SINGLE, "keepaway/respawn.wav", VOL_BASE, ATTN_NONE); // ATTN_NONE (it's a sound intended to be heard anywhere) 
+               sound(self, CH_TRIGGER, "keepaway/respawn.wav", VOL_BASE, ATTN_NONE); // ATTN_NONE (it's a sound intended to be heard anywhere) 
        }
        else
        {
@@@ -99,7 -99,7 +99,7 @@@ void ka_TouchEvent() // runs any time t
        if(other.classname != "player") 
        {  // The ball just touched an object, most likely the world
                pointparticles(particleeffectnum("kaball_sparks"), self.origin, '0 0 0', 1);
-               sound(self, CH_TRIGGER_SINGLE, "keepaway/touch.wav", VOL_BASE, ATTN_NORM);
+               sound(self, CH_TRIGGER, "keepaway/touch.wav", VOL_BASE, ATTN_NORM);
                return; 
        }
        else if(self.wait > time) { return; }
        // messages and sounds
        Send_KillNotification(other.netname, "", "", KA_PICKUPBALL, MSG_KA);
        WriteByte(MSG_BROADCAST, SVC_CENTERPRINT);
 -      WriteString(MSG_BROADCAST, strcat("\n\n", other.netname, "^7 has picked up the ball!\n"));
 +      WriteString(MSG_BROADCAST, strcat(other.netname, "^7 has picked up the ball!"));
        sound(self.owner, CH_TRIGGER, "keepaway/pickedup.wav", VOL_BASE, ATTN_NONE); // ATTN_NONE (it's a sound intended to be heard anywhere) 
        
        // scoring
@@@ -169,8 -169,8 +169,8 @@@ void ka_DropEvent(entity plyr) // runs 
        // messages and sounds
        Send_KillNotification(plyr.netname, "", "", KA_DROPBALL, MSG_KA);
        WriteByte(MSG_BROADCAST, SVC_CENTERPRINT);
 -      WriteString(MSG_BROADCAST, strcat("\n\n", plyr.netname, "^7 has dropped the ball!\n"));
 -      sound(plyr, CH_TRIGGER, "keepaway/dropped.wav", VOL_BASE, ATTN_NONE);   // ATTN_NONE (it's a sound intended to be heard anywhere) 
 +      WriteString(MSG_BROADCAST, strcat(plyr.netname, "^7 has dropped the ball!"));
 +      sound(other, CH_TRIGGER, "keepaway/dropped.wav", VOL_BASE, ATTN_NONE);  // ATTN_NONE (it's a sound intended to be heard anywhere) 
        
        // scoring
        // PlayerScore_Add(plyr, SP_KEEPAWAY_DROPS, 1); Not anymore, this is 100% the same as pickups and is useless.
@@@ -216,7 -216,7 +216,7 @@@ MUTATOR_HOOKFUNCTION(ka_Scoring
                }
                else if(!frag_attacker.ballcarried)
                        if(autocvar_g_keepaway_noncarrier_warn)
 -                              centerprint_atprio(frag_attacker, (CENTERPRIO_SPAM + 5), "Killing people while you don't have the ball gives no points!");
 +                              centerprint(frag_attacker, "Killing people while you don't have the ball gives no points!");
  
                if(frag_attacker.ballcarried) // add to amount of kills while ballcarrier
                        PlayerScore_Add(frag_attacker, SP_SCORE, autocvar_g_keepaway_score_killac);
diff --combined qcsrc/server/t_items.qc
index ec39afcc8c9ccd5c89ead9c8363def8fbea16dc7,99ddc018b95a08352eabb2df2a3ac8fc14b276fc..b502cac3312d051d46c4f044516f78c1d4ff80eb
@@@ -146,11 -146,11 +146,11 @@@ void Item_Respawn (void
  {
        Item_Show(self, 1);
        if(!g_minstagib && self.items == IT_STRENGTH)
-               sound (self, CH_TRIGGER_SINGLE, "misc/strength_respawn.wav", VOL_BASE, ATTN_NORM);      // play respawn sound
+               sound (self, CH_TRIGGER, "misc/strength_respawn.wav", VOL_BASE, ATTN_NORM);     // play respawn sound
        else if(!g_minstagib && self.items == IT_INVINCIBLE)
-               sound (self, CH_TRIGGER_SINGLE, "misc/shield_respawn.wav", VOL_BASE, ATTN_NORM);        // play respawn sound
+               sound (self, CH_TRIGGER, "misc/shield_respawn.wav", VOL_BASE, ATTN_NORM);       // play respawn sound
        else
-               sound (self, CH_TRIGGER_SINGLE, "misc/itemrespawn.wav", VOL_BASE, ATTN_NORM);   // play respawn sound
+               sound (self, CH_TRIGGER, "misc/itemrespawn.wav", VOL_BASE, ATTN_NORM);  // play respawn sound
        setorigin (self, self.origin);
  
        //pointparticles(particleeffectnum("item_respawn"), self.origin + self.mins_z * '0 0 1' + '0 0 48', '0 0 0', 1);
@@@ -203,7 -203,7 +203,7 @@@ void Item_RespawnCountdown (void
                                        WaypointSprite_UpdateBuildFinished(self.waypointsprite_attached, time + ITEM_RESPAWN_TICKS);
                        }
                }
-               sound (self, CH_TRIGGER_SINGLE, "misc/itemrespawncountdown.wav", VOL_BASE, ATTN_NORM);  // play respawn sound
+               sound (self, CH_TRIGGER, "misc/itemrespawncountdown.wav", VOL_BASE, ATTN_NORM); // play respawn sound
                if(self.waypointsprite_attached)
                {
                        WaypointSprite_Ping(self.waypointsprite_attached);
@@@ -279,6 -279,7 +279,6 @@@ float Item_GiveTo(entity item, entity p
                        {
                                pickedup = TRUE;
                                // play some cool sounds ;)
 -                              centerprint(player, "\n");
                                if (clienttype(player) == CLIENTTYPE_REAL)
                                {
                                        if(player.health <= 5)
index 51153a15f92f2a8d2ae3804cdc533ec488aeb061,54dd5a6ce8281c2c852f04dd52a7aa91d204142d..16cbdcded3778eb1bb7988991ecbeb39a11c54ec
@@@ -88,80 -88,77 +88,80 @@@ void W_MinstaNex_Attack (void
  
  
  .float minstagib_nextthink;
 -void minstagib_ammocheck (void)
 +.float minstagib_needammo;
 +void minstagib_stop_countdown(void)
  {
 -      if (time < self.minstagib_nextthink || self.deadflag || gameover)
 +      if (self.minstagib_needammo)
 +      {
 +              self.health = 100;
 +              Send_CSQC_Centerprint_Generic_Expire(self, CPID_MINSTA_FINDAMMO);
 +      }
 +      self.minstagib_needammo = FALSE;
 +}
 +void minstagib_ammocheck(void)
 +{
 +      if (time < self.minstagib_nextthink)
                return;
  
 -      if (self.ammo_cells <= 0)
 -      if not(self.items & IT_UNLIMITED_WEAPON_AMMO)
 +      if (self.deadflag || gameover || self.ammo_cells > 0 || (self.items & IT_UNLIMITED_WEAPON_AMMO))
 +              minstagib_stop_countdown();
 +      else
        {
 +              self.minstagib_needammo = TRUE;
                if (self.health == 5)
                {
 -                      centerprint(self, "you're dead now...\n");
                        Damage(self, self, self, 5, DEATH_NOAMMO, self.origin, '0 0 0');
                        AnnounceTo(self, "terminated");
                }
                else if (self.health == 10)
                {
 -                      centerprint(self, "^11^7 second left to find some ammo\n");
                        Damage(self, self, self, 5, DEATH_NOAMMO, self.origin, '0 0 0');
                        AnnounceTo(self, "1");
                }
                else if (self.health == 20)
                {
 -                      centerprint(self, "^12^7 seconds left to find some ammo\n");
                        Damage(self, self, self, 10, DEATH_NOAMMO, self.origin, '0 0 0');
                        AnnounceTo(self, "2");
                }
                else if (self.health == 30)
                {
 -                      centerprint(self, "^13^7 seconds left to find some ammo\n");
                        Damage(self, self, self, 10, DEATH_NOAMMO, self.origin, '0 0 0');
                        AnnounceTo(self, "3");
                }
                else if (self.health == 40)
                {
 -                      centerprint(self, "^14^7 seconds left to find some ammo\n");
                        Damage(self, self, self, 10, DEATH_NOAMMO, self.origin, '0 0 0');
                        AnnounceTo(self, "4");
                }
                else if (self.health == 50)
                {
 -                      centerprint(self, "^15^7 seconds left to find some ammo\n");
                        Damage(self, self, self, 10, DEATH_NOAMMO, self.origin, '0 0 0');
                        AnnounceTo(self, "5");
                }
                else if (self.health == 60)
                {
 -                      centerprint(self, "^36^7 seconds left to find some ammo\n");
                        Damage(self, self, self, 10, DEATH_NOAMMO, self.origin, '0 0 0');
                        AnnounceTo(self, "6");
                }
                else if (self.health == 70)
                {
 -                      centerprint(self, "^37^7 seconds left to find some ammo\n");
                        Damage(self, self, self, 10, DEATH_NOAMMO, self.origin, '0 0 0');
                        AnnounceTo(self, "7");
                }
                else if (self.health == 80)
                {
 -                      centerprint(self, "^38^7 seconds left to find some ammo\n");
                        Damage(self, self, self, 10, DEATH_NOAMMO, self.origin, '0 0 0');
                        AnnounceTo(self, "8");
                }
                else if (self.health == 90)
                {
 -                      centerprint(self, "^39^7 seconds left to find some ammo\n");
 +                      Send_CSQC_Centerprint_Generic(self, CPID_MINSTA_FINDAMMO, "^1%d^7 seconds left to find some ammo", 1, 9);
                        Damage(self, self, self, 10, DEATH_NOAMMO, self.origin, '0 0 0');
                        AnnounceTo(self, "9");
                }
                else if (self.health == 100)
                {
 -                      centerprint(self, "get some ammo or\nyou'll be dead in ^310^7 seconds...");
 +                      Send_CSQC_Centerprint_Generic(self, CPID_MINSTA_FINDAMMO, "get some ammo or\nyou'll be dead in ^3%d^7 seconds...", 1, 10);
                        Damage(self, self, self, 10, DEATH_NOAMMO, self.origin, '0 0 0');
                        if not(self.flags & FL_GODMODE)
                                AnnounceTo(self, "10");
@@@ -283,7 -280,7 +283,7 @@@ float w_minstanex(float req
                org2 = w_org + w_backoff * 6;
                pointparticles(particleeffectnum("nex_impact"), org2, '0 0 0', 1);
                if(!w_issilent)
-                       sound(self, CH_SHOTS_SINGLE, "weapons/neximpact.wav", VOL_BASE, ATTN_NORM);
+                       sound(self, CH_SHOTS, "weapons/neximpact.wav", VOL_BASE, ATTN_NORM);
        }
        else if(req == WR_PRECACHE)
        {