]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Merge branch 'master' into mirceakitsune/universal_reload_system, with some VERY...
authorMircea Kitsune <sonichedgehog_hyperblast00@yahoo.com>
Wed, 2 Mar 2011 22:19:06 +0000 (00:19 +0200)
committerMircea Kitsune <sonichedgehog_hyperblast00@yahoo.com>
Wed, 2 Mar 2011 22:19:06 +0000 (00:19 +0200)
32 files changed:
defaultXonotic.cfg
gfx/crosshair_ring_nexgun.tga [new file with mode: 0644]
gfx/crosshair_ring_sniperrifle.tga [new file with mode: 0644]
gfx/menu/luminos/background.tga
gfx/menu/luminos/background_ingame_l2.tga
gfx/menu/luminos/background_l2.tga
gfx/menu/luminos/checkbox_c0.tga
gfx/menu/luminos/checkbox_c1.tga
gfx/menu/luminos/checkbox_d0.tga
gfx/menu/luminos/checkbox_d1.tga
gfx/menu/luminos/checkbox_f0.tga
gfx/menu/luminos/checkbox_f1.tga
gfx/menu/luminos/checkbox_n0.tga
gfx/menu/luminos/checkbox_n1.tga
gfx/menu/luminos/slider_c.tga
gfx/menu/luminos/slider_d.tga
gfx/menu/luminos/slider_f.tga
gfx/menu/luminos/slider_n.tga
qcsrc/client/Defs.qc
qcsrc/client/Main.qc
qcsrc/client/View.qc
qcsrc/client/autocvars.qh
qcsrc/client/hud.qc
qcsrc/common/constants.qh
qcsrc/menu/item/button.c
qcsrc/menu/item/slider.c
qcsrc/menu/menu.qc
qcsrc/server/cl_client.qc
qcsrc/server/defs.qh
qcsrc/server/g_world.qc
qcsrc/server/w_minelayer.qc
tooltips.db

index d038dc523c1df5762333a6c82066c39f789511e4..95adfb723c0b06a4f0ab9111cd5d2e120d80ed5a 100644 (file)
@@ -188,12 +188,16 @@ seta crosshair_fireball_size 1    "crosshair size when wielding the fireball"
 seta crosshair_color_by_health 0 "if enabled, crosshair color will depend on current health"
 
 // ring around crosshair, used for various purposes (such as indicating bullets left in clip, nex charge)
+seta crosshair_ring 1 "main cvar to enable or disable crosshair rings"
+seta crosshair_ring_inner 0 "allow inner rings to be drawn too"
 seta crosshair_ring_size 2     "bullet counter ring size for Rifle, velocity ring for Nex"
 seta crosshair_ring_alpha 0.2  "ring alpha"
 
+seta crosshair_ring_sniperrifle 1 "draw a ring showing the ammount of ammo left in the sniperrifle
 seta crosshair_ring_sniperrifle_alpha 0.15
 
-seta crosshair_ring_nex_outer_alpha 0.15
+seta crosshair_ring_nex 1 "draw a ring showing the current charge of the nexgun"
+seta crosshair_ring_nex_alpha 0.15
 seta crosshair_ring_nex_inner_alpha 0.15
 seta crosshair_ring_nex_inner_color_red 0.8
 seta crosshair_ring_nex_inner_color_green 0
@@ -201,6 +205,9 @@ seta crosshair_ring_nex_inner_color_blue 0
 seta crosshair_ring_nex_currentcharge_scale 30
 seta crosshair_ring_nex_currentcharge_movingavg_rate 0.05
 
+seta crosshair_ring_minelayer 1
+seta crosshair_ring_minelayer_alpha 0.15
+
 seta cl_reticle_stretch 0 "whether to stretch reticles so they fit the screen (brakes image proportions)"
 seta cl_reticle_item_nex 1 "draw aiming reticle for the nex weapon's zoom, 0 disables and values between 0 and 1 change alpha"
 seta cl_reticle_item_normal 1 "draw reticle when zooming with the zoom button, 0 disables and values between 0 and 1 change alpha"
diff --git a/gfx/crosshair_ring_nexgun.tga b/gfx/crosshair_ring_nexgun.tga
new file mode 100644 (file)
index 0000000..6100096
Binary files /dev/null and b/gfx/crosshair_ring_nexgun.tga differ
diff --git a/gfx/crosshair_ring_sniperrifle.tga b/gfx/crosshair_ring_sniperrifle.tga
new file mode 100644 (file)
index 0000000..b25e350
Binary files /dev/null and b/gfx/crosshair_ring_sniperrifle.tga differ
index 67e31a5402b569b3a01df542002003b6b84c41b4..7497ddc52b928aa2da40ed85118a8953ed86257c 100644 (file)
Binary files a/gfx/menu/luminos/background.tga and b/gfx/menu/luminos/background.tga differ
index f134814f71a9de111bfbc4ed11ea774756eb7f2d..d77948c2d49af0b9c725ead0630896cce8a42bd3 100644 (file)
Binary files a/gfx/menu/luminos/background_ingame_l2.tga and b/gfx/menu/luminos/background_ingame_l2.tga differ
index f134814f71a9de111bfbc4ed11ea774756eb7f2d..d77948c2d49af0b9c725ead0630896cce8a42bd3 100644 (file)
Binary files a/gfx/menu/luminos/background_l2.tga and b/gfx/menu/luminos/background_l2.tga differ
index 37dbf737ff70c0f669a88bee9f07b22e7faf4fc6..af82c92b847d0bf57cd67f2019c68e75e731f81e 100644 (file)
Binary files a/gfx/menu/luminos/checkbox_c0.tga and b/gfx/menu/luminos/checkbox_c0.tga differ
index 37dbf737ff70c0f669a88bee9f07b22e7faf4fc6..af82c92b847d0bf57cd67f2019c68e75e731f81e 100644 (file)
Binary files a/gfx/menu/luminos/checkbox_c1.tga and b/gfx/menu/luminos/checkbox_c1.tga differ
index f94884483987e7133d11eb4bfd06477248720fd0..d7a8be78f882ac7d6421ef4a2efc32bd0bbbc1fc 100644 (file)
Binary files a/gfx/menu/luminos/checkbox_d0.tga and b/gfx/menu/luminos/checkbox_d0.tga differ
index a1dad7eae341a7bbe883cb566868ba44e39afa4f..b0f7cccaa376113f43ceff2992912fd7b9f86529 100644 (file)
Binary files a/gfx/menu/luminos/checkbox_d1.tga and b/gfx/menu/luminos/checkbox_d1.tga differ
index c04496827e11423beeb305a2cbf804eeb3d6a25f..257f544e43bcfa71bfb3888bd61f0fc7e7a01936 100644 (file)
Binary files a/gfx/menu/luminos/checkbox_f0.tga and b/gfx/menu/luminos/checkbox_f0.tga differ
index 71aad7afb298eb3ff42639e4b5b353dfb16cc21d..5286cfa4e0a71e3c3cfe8989f1560e416ad80ee4 100644 (file)
Binary files a/gfx/menu/luminos/checkbox_f1.tga and b/gfx/menu/luminos/checkbox_f1.tga differ
index b0efdda8380af4a3917399988459bba8d24e6c5b..b26d7ba91246948254f8dab4a1404fa0823d3f34 100644 (file)
Binary files a/gfx/menu/luminos/checkbox_n0.tga and b/gfx/menu/luminos/checkbox_n0.tga differ
index 37dbf737ff70c0f669a88bee9f07b22e7faf4fc6..af82c92b847d0bf57cd67f2019c68e75e731f81e 100644 (file)
Binary files a/gfx/menu/luminos/checkbox_n1.tga and b/gfx/menu/luminos/checkbox_n1.tga differ
index fe43eb9c7ebd5993312a3d2b2f5ba97dfe244160..a198d7a4856152825c028c2d5aa1c02ea1a0b5fb 100644 (file)
Binary files a/gfx/menu/luminos/slider_c.tga and b/gfx/menu/luminos/slider_c.tga differ
index aaa80f05134774ab9e10849294671cd00999c0e5..da81872a1ce544f80fdfa2cd0b4881be3bfaced9 100644 (file)
Binary files a/gfx/menu/luminos/slider_d.tga and b/gfx/menu/luminos/slider_d.tga differ
index 3dea5852d6457b7a9ab4cc142e3c8a60b7f02a21..38b7140adf977fd5393dec452cf0ff4e2e7e35af 100644 (file)
Binary files a/gfx/menu/luminos/slider_f.tga and b/gfx/menu/luminos/slider_f.tga differ
index e270201fc18e56b74d5dc58613b85c9c19c03592..2584eecb5329723db6b5330ad0e38cd7359bf490 100644 (file)
Binary files a/gfx/menu/luminos/slider_n.tga and b/gfx/menu/luminos/slider_n.tga differ
index eef29cdd551bd1fc3a3db1e1f402be9f8929feb3..b3b0569489d992798c0ea9355f3a7a5296730968 100644 (file)
@@ -261,6 +261,8 @@ vector w_org, w_backoff;
 float sniperrifle_scope;
 float nex_scope;
 
+float minelayer_maxmines;
+
 float bgmtime;
 
 string weaponorder_byimpulse;
index 125c6db3122c4e998e49731b0a383af41ce46248..bec75c2ee06f920b989780955c77211ccf9bc231 100644 (file)
@@ -1094,6 +1094,8 @@ void Ent_Init()
 
        serverflags = ReadByte();
 
+       minelayer_maxmines = ReadByte();
+
        g_trueaim_minrange = ReadCoord();
 
        if(!postinit)
index 62ab6b6823400f58c835346e1419a379bf84870a..e95a01346fdae2b5d22b857c88db950cfdba4a10 100644 (file)
@@ -866,7 +866,9 @@ void CSQC_UpdateView(float w, float h)
 
                        // TrueAim check
                        float shottype;
+
                        float weapon_clipload, weapon_clipsize, ring_scale;
+
                        // wcross_origin = '0.5 0 0' * vid_conwidth + '0 0.5 0' * vid_conheight;
                        wcross_origin = project_3d_to_2d(view_origin + MAX_SHOT_DISTANCE * view_forward);
                        wcross_origin_z = 0;
@@ -1064,51 +1066,68 @@ void CSQC_UpdateView(float w, float h)
 
                        wcross_scale *= 1 - autocvar__menu_alpha;
                        wcross_alpha *= 1 - autocvar__menu_alpha;
-
-                       ring_scale = autocvar_crosshair_ring_size;
-
                        wcross_size = drawgetimagesize(wcross_name) * wcross_scale;
 
-                       float nex_charge, nex_chargepool;
-                       nex_charge = getstatf(STAT_NEX_CHARGE);
-                       nex_chargepool = getstatf(STAT_NEX_CHARGEPOOL);
-
-                       if(nex_charge_movingavg == 0) // this should only happen if we have just loaded up the game
-                               nex_charge_movingavg = nex_charge;
-
-                       // ring around crosshair representing ammo left in weapon clip
-                       weapon_clipload = getstati(STAT_WEAPON_CLIPLOAD);
-                       if (weapon_clipload)
+                       if (autocvar_crosshair_ring)
                        {
-                               weapon_clipsize = getstati(STAT_WEAPON_CLIPSIZE);
-                               f = bound(0, weapon_clipload / weapon_clipsize, 1);
+                               float ring_value, ring_alpha, ring_inner_value, ring_inner_alpha;
+                               string ring_image, ring_inner_image;
+                               vector ring_rgb, ring_inner_rgb;
+                               
+                               float ring_scale = autocvar_crosshair_ring_size;
+                               
+                               float nex_charge, nex_chargepool;
+                               nex_charge = getstatf(STAT_NEX_CHARGE);
+                               nex_chargepool = getstatf(STAT_NEX_CHARGEPOOL);
+                               
+                               if(nex_charge_movingavg == 0) // this should only happen if we have just loaded up the game
+                                       nex_charge_movingavg = nex_charge;
 
-                               a = autocvar_crosshair_ring_sniperrifle_alpha;
-                               DrawCircleClippedPic(wcross_origin, wcross_size_x * ring_scale, "gfx/crosshair_ring.tga", f, wcross_color, wcross_alpha * a, DRAWFLAG_ADDITIVE);
-                       }
-                       if (activeweapon == WEP_NEX && nex_charge) // ring around crosshair representing velocity-dependent damage for the nex
-                       {
-                               if(nex_chargepool || use_nex_chargepool)
+                               weapon_clipload = getstati(STAT_WEAPON_CLIPLOAD);
+                               if (weapon_clipload) // ring around crosshair representing ammo left in weapon clip
                                {
-                                       use_nex_chargepool = 1;
-
-                                       a = autocvar_crosshair_ring_nex_inner_alpha;
-                                       rgb = eX * autocvar_crosshair_ring_nex_inner_color_red + eY * autocvar_crosshair_ring_nex_inner_color_green + eZ * autocvar_crosshair_ring_nex_inner_color_blue;
-                                       DrawCircleClippedPic(wcross_origin, wcross_size_x * ring_scale, "gfx/crosshair_ring_inner.tga", nex_chargepool, rgb, wcross_alpha * a, DRAWFLAG_ADDITIVE);
+                                       weapon_clipsize = getstati(STAT_WEAPON_CLIPSIZE);
+                                       f = bound(0, weapon_clipload / weapon_clipsize, 1);
+                                       a = autocvar_crosshair_ring_sniperrifle_alpha;
+
+                                       ring_value = f;
+                                       ring_alpha = a;
+                                       ring_image = "gfx/crosshair_ring_sniperrifle.tga";
+                                       ring_rgb = wcross_color;
                                }
-                               else
+                               else if (activeweapon == WEP_NEX && nex_charge && autocvar_crosshair_ring_nex) // ring around crosshair representing velocity-dependent damage for the nex
                                {
-                                       // indicate how much we're charging right now with an inner circle
-                                       a = autocvar_crosshair_ring_nex_inner_alpha;
-                                       nex_charge_movingavg = (1 - autocvar_crosshair_ring_nex_currentcharge_movingavg_rate) * nex_charge_movingavg + autocvar_crosshair_ring_nex_currentcharge_movingavg_rate * nex_charge;
-
-                                       rgb = eX * autocvar_crosshair_ring_nex_inner_color_red + eY * autocvar_crosshair_ring_nex_inner_color_green + eZ * autocvar_crosshair_ring_nex_inner_color_blue;
-                                       DrawCircleClippedPic(wcross_origin, wcross_size_x * ring_scale, "gfx/crosshair_ring_inner.tga", bound(0, autocvar_crosshair_ring_nex_currentcharge_scale * (nex_charge - nex_charge_movingavg), 1), rgb, wcross_alpha * a, DRAWFLAG_ADDITIVE);
+                                       if (nex_chargepool || use_nex_chargepool) { 
+                                               use_nex_chargepool = 1; 
+                                               ring_inner_value = nex_chargepool;
+                                       } else { 
+                                               nex_charge_movingavg = (1 - autocvar_crosshair_ring_nex_currentcharge_movingavg_rate) * nex_charge_movingavg + autocvar_crosshair_ring_nex_currentcharge_movingavg_rate * nex_charge;
+                                               ring_inner_value = bound(0, autocvar_crosshair_ring_nex_currentcharge_scale * (nex_charge - nex_charge_movingavg), 1); 
+                                       }
+                                               
+                                       ring_inner_alpha = wcross_alpha * autocvar_crosshair_ring_nex_inner_alpha;
+                                       ring_inner_image = "gfx/crosshair_ring_inner.tga";
+                                       ring_inner_rgb = eX * autocvar_crosshair_ring_nex_inner_color_red + eY * autocvar_crosshair_ring_nex_inner_color_green + eZ * autocvar_crosshair_ring_nex_inner_color_blue;
+
+                                       // draw the outer ring to show the current charge of the weapon
+                                       ring_value = nex_charge;
+                                       ring_alpha = wcross_alpha * autocvar_crosshair_ring_nex_alpha;
+                                       ring_image = "gfx/crosshair_ring_nexgun.tga";
+                                       ring_rgb = wcross_color;
                                }
-
-                               // draw the charge
-                               a = autocvar_crosshair_ring_nex_outer_alpha;
-                               DrawCircleClippedPic(wcross_origin, wcross_size_x * ring_scale, "gfx/crosshair_ring.tga", nex_charge, wcross_color, wcross_alpha * a, DRAWFLAG_ADDITIVE);
+                               else if (activeweapon == WEP_MINE_LAYER && minelayer_maxmines && autocvar_crosshair_ring_minelayer) 
+                               {
+                                       ring_value = bound(0, getstati(STAT_LAYED_MINES) / minelayer_maxmines, 1); // if you later need to use the count of bullets in another place, then add a float for it. For now, no need to.
+                                       ring_alpha = wcross_alpha * autocvar_crosshair_ring_minelayer_alpha;
+                                       ring_image = "gfx/crosshair_ring.tga";
+                                       ring_rgb = wcross_color;
+                               }
+                               
+                               if (autocvar_crosshair_ring_inner && ring_inner_value) // lets draw a ring inside a ring so you can ring while you ring
+                                       DrawCircleClippedPic(wcross_origin, wcross_size_x * ring_scale, ring_inner_image, ring_inner_value, ring_inner_rgb, ring_inner_alpha, DRAWFLAG_ADDITIVE);
+                               
+                               if (ring_value)
+                                       DrawCircleClippedPic(wcross_origin, wcross_size_x * ring_scale, ring_image, ring_value, ring_rgb, ring_alpha, DRAWFLAG_ADDITIVE);
                        }
 
 #define CROSSHAIR_DO_BLUR(M,sz,wcross_name,wcross_alpha) \
index 0cf1e4bf8dc8d5f76652fa0141d269ce66ff358f..867859c571de307787db1182970cb8a201619f30 100644 (file)
@@ -108,15 +108,21 @@ float autocvar_crosshair_hittest_showimpact;
 float autocvar_crosshair_per_weapon;
 float autocvar_crosshair_pickup;
 float autocvar_crosshair_pickup_speed;
-float autocvar_crosshair_ring_sniperrifle_alpha;
+float autocvar_crosshair_ring;
+float autocvar_crosshair_ring_inner;
+float autocvar_crosshair_ring_minelayer;
+float autocvar_crosshair_ring_minelayer_alpha;
+float autocvar_crosshair_ring_nex;
+float autocvar_crosshair_ring_nex_alpha;
 float autocvar_crosshair_ring_nex_currentcharge_movingavg_rate;
 float autocvar_crosshair_ring_nex_currentcharge_scale;
 float autocvar_crosshair_ring_nex_inner_alpha;
 float autocvar_crosshair_ring_nex_inner_color_blue;
 float autocvar_crosshair_ring_nex_inner_color_green;
 float autocvar_crosshair_ring_nex_inner_color_red;
-float autocvar_crosshair_ring_nex_outer_alpha;
 float autocvar_crosshair_ring_size;
+float autocvar_crosshair_ring_sniperrifle;
+float autocvar_crosshair_ring_sniperrifle_alpha;
 float autocvar_crosshair_size;
 float autocvar_ekg;
 float autocvar_fov;
index d55cfd86612c76b69034738b7bf0a7d714fe398f..30a925a4f8d815560f4ba87127ea6ed14e1d5244 100644 (file)
@@ -1823,7 +1823,7 @@ void HUD_Weapons(void)
 
                        string s;
                        if(complain_weapon_type == 0) {
-                               s = "Out of ammo";
+                               s = _("Out of ammo");
                                color = stov(autocvar_hud_panel_weapons_complainbubble_color_outofammo);
                        }
                        else if(complain_weapon_type == 1) {
@@ -2750,7 +2750,7 @@ void HUD_KillNotify(string s1, string s2, string s3, float type, float msg) // s
                        }
                }
                else if(type == KILL_FIRST_BLOOD)
-                       print(sprintf("^1%s^1 drew first blood\n", s1));
+                       print(sprintf(_("^1%s^1 drew first blood\n"), s1));
                else if (type == DEATH_TELEFRAG) {
                        HUD_KillNotify_Push(s1, s2, 1, DEATH_TELEFRAG);
                        if(gentle)
@@ -2910,7 +2910,7 @@ void HUD_KillNotify(string s1, string s2, string s3, float type, float msg) // s
                } else if (type == DEATH_SLIME) {
                        HUD_KillNotify_Push(s1, "", 0, DEATH_SLIME);
                        if(alsoprint)
-                               print (sprintf("^1%s^1 was slimed\n", s1));
+                               print (sprintf(_("^1%s^1 was slimed\n"), s1));
                } else if (type == DEATH_LAVA) {
                        HUD_KillNotify_Push(s1, "", 0, DEATH_LAVA);
                        if(alsoprint)
@@ -3889,7 +3889,7 @@ void HUD_VoteWindow(void)
        if(autocvar_cl_allow_uid2name == -1 && (gametype == GAME_CTS || gametype == GAME_RACE))
        {
                vote_active = 1;
-               vote_called_vote = strzone(_("^2Name ^7instead of \"^1Unregistered player\" ^7in stats"));
+               vote_called_vote = strzone(_("^2Name ^7instead of \"^1Unregistered player^7\" in stats"));
         uid2name_dialog = 1;
        }
 
@@ -4984,7 +4984,7 @@ void HUD_InfoMessages(void)
                                        if (tm)
                                        if (tm.team != COLOR_SPECTATOR)
                                        if (tm.team_size == ts_max)
-                                               s = strcat(s, sprintf(" Press ^3%s%s to adjust", getcommandkey("team menu", "menu_showteamselect"), blinkcolor));
+                                               s = strcat(s, sprintf(_(" Press ^3%s%s to adjust"), getcommandkey("team menu", "menu_showteamselect"), blinkcolor));
                                        drawInfoMessage(s)
                                }
                        }
index b8c4f44699cf61a95df7230d9b1c1a5602d820be..419ab73e8fa1b8e14d21f44afca79f7775e0936b 100644 (file)
@@ -62,6 +62,7 @@ const float TE_CSQC_TARGET_MUSIC = 111;
 const float TE_CSQC_NOTIFY = 112;
 const float TE_CSQC_WEAPONCOMPLAIN = 113;
 const float TE_CSQC_NEX_SCOPE = 116;
+const float TE_CSQC_MINELAYER_MAXMINES = 117;
 
 const float RACE_NET_CHECKPOINT_HIT_QUALIFYING = 0; // byte checkpoint, short time, short recordtime, string recordholder
 const float RACE_NET_CHECKPOINT_CLEAR = 1;
@@ -315,6 +316,7 @@ const float STAT_HUD = 52;
 const float STAT_NEX_CHARGEPOOL = 53;
 const float STAT_HIT_TIME = 54;
 const float STAT_TYPEHIT_TIME = 55;
+const float STAT_LAYED_MINES = 56;
 
 // see DP source, quakedef.h
 const float STAT_MOVEVARS_AIRSPEEDLIMIT_NONQW = 222;
index 527672d254f41acb6795a336f05da00d3ffb7e45..71ca11c7c3a439327f888e8edc605b7d6fa36e35 100644 (file)
@@ -74,13 +74,15 @@ float Button_mousePress(entity me, vector pos)
 }
 float Button_mouseRelease(entity me, vector pos)
 {
-       if(cvar("menu_sounds"))
-               localsound("sound/misc/menu2.wav");
        me.mouseDrag(me, pos); // verify coordinates
        if(me.pressed)
        {
                if not(me.disabled)
+               {
+                       if(cvar("menu_sounds"))
+                               localsound("sound/misc/menu2.wav");
                        me.onClick(me, me.onClickEntity);
+               }
                me.pressed = 0;
        }
        return 1;
index eb8e5cb4a128ca823f669425fa66b6f6fd2f59df..8861357b7700590438a82362ea8a7ece71a7a1fb 100644 (file)
@@ -239,11 +239,11 @@ float Slider_mousePress(entity me, vector pos)
 }
 float Slider_mouseRelease(entity me, vector pos)
 {
-       if(cvar("menu_sounds"))
-               localsound("sound/misc/menu2.wav");
        me.pressed = 0;
        if(me.disabled)
                return 0;
+       if(cvar("menu_sounds"))
+               localsound("sound/misc/menu2.wav");
        return 1;
 }
 void Slider_showNotify(entity me)
index 4f0283c93e6587436a4d2109a77e4392127232fa..0894856f1f9e27f0b72334a23940dcd86e88252c 100644 (file)
@@ -350,12 +350,12 @@ float m_allocatetooltipbox(vector pos)
        vector avoidplus, avoidminus;
        vector v;
 
-       avoidplus_x = (SKINAVOID_TOOLTIP_x + SKINSIZE_CURSOR_x - SKINOFFSET_CURSOR_x) / conwidth;
-       avoidplus_y = (SKINAVOID_TOOLTIP_y + SKINSIZE_CURSOR_y - SKINOFFSET_CURSOR_y) / conheight;
+       avoidplus_x = (SKINAVOID_TOOLTIP_x + SKINSIZE_CURSOR_x - SKINOFFSET_CURSOR_x * SKINSIZE_CURSOR_x) / conwidth;
+       avoidplus_y = (SKINAVOID_TOOLTIP_y + SKINSIZE_CURSOR_y - SKINOFFSET_CURSOR_y * SKINSIZE_CURSOR_y) / conheight;
        avoidplus_z = 0;
 
-       avoidminus_x = (SKINAVOID_TOOLTIP_x + SKINOFFSET_CURSOR_x) / conwidth + menuTooltipSize_x;
-       avoidminus_y = (SKINAVOID_TOOLTIP_y + SKINOFFSET_CURSOR_y) / conheight + menuTooltipSize_y;
+       avoidminus_x = (SKINAVOID_TOOLTIP_x + SKINOFFSET_CURSOR_x * SKINSIZE_CURSOR_x) / conwidth + menuTooltipSize_x;
+       avoidminus_y = (SKINAVOID_TOOLTIP_y + SKINOFFSET_CURSOR_y * SKINSIZE_CURSOR_y) / conheight + menuTooltipSize_y;
        avoidminus_z = 0;
 
        // bottom right
index c5312469a892864b6dc231f92fc76831a4813da9..1b10b6e254869f29b1482635c27f36fdaf963f9e 100644 (file)
@@ -1115,6 +1115,7 @@ float ClientInit_SendEntity(entity to, float sf)
        WriteByte(MSG_ENTITY, autocvar_g_balance_nex_secondary); // client has to know if it should zoom or not
        WriteByte(MSG_ENTITY, autocvar_g_balance_sniperrifle_secondary); // client has to know if it should zoom or not
        WriteByte(MSG_ENTITY, serverflags); // client has to know if it should zoom or not
+       WriteByte(MSG_ENTITY, autocvar_g_balance_minelayer_limit); // minelayer max mines
        WriteCoord(MSG_ENTITY, autocvar_g_trueaim_minrange);
        return TRUE;
 }
@@ -2361,6 +2362,9 @@ void SpectateCopy(entity spectatee) {
        self.weapons = spectatee.weapons;
        self.switchweapon = spectatee.switchweapon;
        self.weapon = spectatee.weapon;
+       self.nex_charge = spectatee.nex_charge;
+       self.nex_chargepool_ammo = spectatee.nex_chargepool_ammo;
+       self.minelayer_mines = spectatee.minelayer_mines;
        self.punchangle = spectatee.punchangle;
        self.view_ofs = spectatee.view_ofs;
        self.v_angle = spectatee.v_angle;
index 39eebe7fb8a6d54059b77431547de55fb01194a5..ff6658d2959f3b1cdec4dc0852253d16e979f582 100644 (file)
@@ -618,6 +618,7 @@ float client_cefc_accumulatortime;
 .float clip_load;
 .float old_clip_load;
 .float clip_size;
+.float minelayer_mines;
 
 #define PROJECTILE_MAKETRIGGER(e) (e).solid = SOLID_CORPSE; (e).dphitcontentsmask = DPCONTENTS_SOLID | DPCONTENTS_BODY | DPCONTENTS_CORPSE
 // when doing this, hagar can go through clones
index 2a8093a2fad560aa19cec8f47f93608a3af0a83a..4c41852ebba66057b10d7d906c5b199a55994005 100644 (file)
@@ -828,6 +828,7 @@ void spawnfunc_worldspawn (void)
        addstat(STAT_LAST_PICKUP, AS_FLOAT, last_pickup);
        addstat(STAT_HIT_TIME, AS_FLOAT, hit_time);
        addstat(STAT_TYPEHIT_TIME, AS_FLOAT, typehit_time);
+       addstat(STAT_LAYED_MINES, AS_INT, minelayer_mines);
 
        addstat(STAT_NEX_CHARGE, AS_FLOAT, nex_charge);
        addstat(STAT_NEX_CHARGEPOOL, AS_FLOAT, nex_chargepool_ammo);
index 18b183fffe7d686c7c8cdfbe97ef19948e0404a0..7c07fa4bcf4588a84578f75bb099cd98afc183cb 100644 (file)
@@ -3,7 +3,7 @@ REGISTER_WEAPON(MINE_LAYER, w_minelayer, IT_ROCKETS, 4, WEP_FLAG_NORMAL | WEP_FL
 #else
 #ifdef SVQC
 void W_Mine_Think (void);
-.float minelayer_detonate, minelayer_mines;
+.float minelayer_detonate, mine_explodeanyway;
 .float mine_time;
 
 void spawnfunc_weapon_minelayer (void)
@@ -73,6 +73,7 @@ void W_Mine_Explode ()
                        self.owner.switchweapon = w_getbestweapon(self.owner);
                }
        }
+       self.owner.minelayer_mines -= 1;
        remove (self);
 }
 
@@ -92,6 +93,7 @@ void W_Mine_DoRemoteExplode ()
                        self.owner.switchweapon = w_getbestweapon(self.owner);
                }
        }
+       self.owner.minelayer_mines -= 1;
        remove (self);
 }
 
@@ -110,7 +112,7 @@ void W_Mine_RemoteExplode ()
 void W_Mine_ProximityExplode ()
 {
        // make sure no friend is in the mine's radius. If there is any, explosion is delayed until he's at a safe distance
-       if(autocvar_g_balance_minelayer_protection && self.minelayer_mines == 0)
+       if(autocvar_g_balance_minelayer_protection && self.mine_explodeanyway == 0)
        {
                entity head;
                head = findradius(self.origin, autocvar_g_balance_minelayer_radius);
@@ -126,6 +128,16 @@ void W_Mine_ProximityExplode ()
        W_Mine_Explode();
 }
 
+float W_Mine_Count(entity e)
+{
+       float minecount;
+       entity mine;
+       for(mine = world; (mine = find(mine, classname, "mine")); ) if(mine.owner == e)
+               minecount += 1;
+               
+       return minecount;
+}
+
 void W_Mine_Think (void)
 {
        entity head;
@@ -139,7 +151,7 @@ void W_Mine_Think (void)
                if(autocvar_g_balance_minelayer_lifetime_countdown > 0)
                        spamsound (self, CHAN_PROJECTILE, "weapons/mine_trigger.wav", VOL_BASE, ATTN_NORM);
                self.mine_time = time + autocvar_g_balance_minelayer_lifetime_countdown;
-               self.minelayer_mines = 1; // make the mine super aggressive
+               self.mine_explodeanyway = 1; // make the mine super aggressive -- Samual: Rather, make it not care if a team mate is near.
        }
 
        // a player's mines shall explode if he disconnects or dies
@@ -207,11 +219,8 @@ void W_Mine_Attack (void)
        // scan how many mines we placed, and return if we reached our limit
        if(autocvar_g_balance_minelayer_limit)
        {
-               self.minelayer_mines = 0;
-               for(mine = world; (mine = find(mine, classname, "mine")); ) if(mine.owner == self)
-                       self.minelayer_mines += 1;
-
-               if(self.minelayer_mines >= autocvar_g_balance_minelayer_limit)
+       
+               if(W_Mine_Count(self) >= autocvar_g_balance_minelayer_limit)
                {
                        // the refire delay keeps this message from being spammed
                        sprint(self, strcat("You cannot place more than ^2", ftos(autocvar_g_balance_minelayer_limit), " ^7mines at a time\n") );
@@ -267,6 +276,8 @@ void W_Mine_Attack (void)
        // common properties
 
        other = mine; MUTATOR_CALLHOOK(EditProjectile);
+       
+       self.minelayer_mines = W_Mine_Count(self);
 }
 
 void spawnfunc_weapon_minelayer (void); // defined in t_items.qc
index e8aa0f6cd1ee6ee2817a7b3098b5ee394e9b21ef..a0443b70352e8a8477e5570f332925589c782127 100644 (file)
 \sv_vote_simple_majority_factor\Simple majority wins a vote
 \XonoticMultiplayerDialog/Advanced settings...\Advanced server settings
 \XonoticMultiplayerDialog/Mutators...\Mutators and weapon arenas
+\g_dodging\Enable dodging
 \g_cloaked\All players are almost invisible
 \g_footsteps\Enable footstep sounds
-\g_midair\Only possible to inflict damage on your enemy while he's airborn
+\g_midair\Only possible to inflict damage on your enemy while he's airborne
 \g_vampire\Damage done to your enemy gets added to your own health
 \g_bloodloss\Amount of health below which your player gets stunned because of blood loss
 \sv_gravity\Make things fall to the ground slower, lower value means lower gravity