]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Merge remote branch 'refs/remotes/origin/fruitiex/fruitbalance'
authorRudolf Polzer <divVerent@xonotic.org>
Wed, 13 Oct 2010 09:49:59 +0000 (11:49 +0200)
committerRudolf Polzer <divVerent@xonotic.org>
Wed, 13 Oct 2010 09:49:59 +0000 (11:49 +0200)
16 files changed:
balance25.cfg
balanceLeeStricklin.cfg
balanceNexSVN.cfg
balanceSamual.cfg
balanceXonotic.cfg
effectinfo.txt
models/weapons/g_minelayer.md3
models/weapons/v_minelayer.md3
particles/lgbeam.tga
qcsrc/client/Defs.qc
qcsrc/client/Main.qc
qcsrc/client/View.qc
qcsrc/server/cl_client.qc
qcsrc/server/cl_physics.qc
qcsrc/server/w_campingrifle.qc
qcsrc/server/w_nex.qc

index 0ed48b3e356d53718373dccc9a6832fe821487d1..56e3f878b29744fdac1f218d0dcddb02b8182ac1 100644 (file)
@@ -437,6 +437,7 @@ set g_balance_nex_secondary_damagefalloff_forcehalflife 0
 set g_balance_nex_velocitydependent_halflife 0
 set g_balance_nex_velocitydependent_minspeed 400
 set g_balance_nex_velocitydependent_maxspeed 1000
+set g_balance_nex_velocitydependent_falloff_factor 0.001
 // }}}
 // {{{ minstanex
 set g_balance_minstanex_refire 1
@@ -561,7 +562,7 @@ set g_balance_campingrifle_magazinecapacity 8
 set g_balance_campingrifle_reloadtime 2 // matches reload anim
 set g_balance_campingrifle_auto_reload_after_changing_weapons 0
 set g_balance_campingrifle_bursttime 0
-set g_balance_campingrifle_tracer 0
+set g_balance_campingrifle_primary_tracer 0
 set g_balance_campingrifle_primary_damage 60
 set g_balance_campingrifle_primary_headshotaddeddamage 100
 set g_balance_campingrifle_primary_spread 0
@@ -575,6 +576,7 @@ set g_balance_campingrifle_primary_bulletconstant 130 // 56.3qu
 set g_balance_campingrifle_primary_burstcost 0
 set g_balance_campingrifle_primary_bullethail 0 // empty magazine on shot
 set g_balance_campingrifle_secondary 1
+set g_balance_campingrifle_secondary_tracer 0
 set g_balance_campingrifle_secondary_damage 35
 set g_balance_campingrifle_secondary_headshotaddeddamage 15 // 50 damage only on head
 set g_balance_campingrifle_secondary_spread 0.008
index 1120cdbcf137b8c59eec6f484e18feb8f252f32d..88e0f8708790f3df2ea1325fa6d3c1f8fef8f962 100644 (file)
@@ -448,6 +448,7 @@ set g_balance_nex_secondary_damagefalloff_forcehalflife 9999999
 set g_balance_nex_velocitydependent_halflife 0
 set g_balance_nex_velocitydependent_minspeed 400
 set g_balance_nex_velocitydependent_maxspeed 1000
+set g_balance_nex_velocitydependent_falloff_factor 0.001
 // }}}
 // {{{ minstanex
 set g_balance_minstanex_refire 1
@@ -572,7 +573,7 @@ set g_balance_campingrifle_magazinecapacity 8
 set g_balance_campingrifle_reloadtime 2 // matches reload anim
 set g_balance_campingrifle_auto_reload_after_changing_weapons 0
 set g_balance_campingrifle_bursttime 0.85 // 0.35 - 0.1 + 0.35 - 0.1 + 0.35 = three secondaries
-set g_balance_campingrifle_tracer 1
+set g_balance_campingrifle_primary_tracer 0
 set g_balance_campingrifle_primary_damage 75
 set g_balance_campingrifle_primary_headshotaddeddamage 90
 set g_balance_campingrifle_primary_spread 0
@@ -586,6 +587,7 @@ set g_balance_campingrifle_primary_bulletconstant 130 // 56.3qu
 set g_balance_campingrifle_primary_burstcost 0 // require same cooldown as secondary, note it's smaller than primary refire time
 set g_balance_campingrifle_primary_bullethail 0 // empty magazine on shot
 set g_balance_campingrifle_secondary 1
+set g_balance_campingrifle_secondary_tracer 0
 set g_balance_campingrifle_secondary_damage 40
 set g_balance_campingrifle_secondary_headshotaddeddamage 20
 set g_balance_campingrifle_secondary_spread 0.008
index 82b0cfc50147f8741e5069d9504e33dfc167c13e..9cfc751dc7e89d911b74811731e4a7ce2dbed4b8 100644 (file)
@@ -436,6 +436,7 @@ set g_balance_nex_secondary_damagefalloff_forcehalflife 1500
 set g_balance_nex_velocitydependent_halflife 0
 set g_balance_nex_velocitydependent_minspeed 400
 set g_balance_nex_velocitydependent_maxspeed 1000
+set g_balance_nex_velocitydependent_falloff_factor 0.001
 // }}}
 // {{{ minstanex
 set g_balance_minstanex_refire 1
@@ -560,7 +561,7 @@ set g_balance_campingrifle_magazinecapacity 0
 set g_balance_campingrifle_reloadtime 2 // matches reload anim
 set g_balance_campingrifle_auto_reload_after_changing_weapons 0
 set g_balance_campingrifle_bursttime 0.85 // 0.35 - 0.1 + 0.35 - 0.1 + 0.35 = three secondaries
-set g_balance_campingrifle_tracer 1
+set g_balance_campingrifle_primary_tracer 0
 set g_balance_campingrifle_primary_damage 50
 set g_balance_campingrifle_primary_headshotaddeddamage 50
 set g_balance_campingrifle_primary_spread 0
@@ -574,6 +575,7 @@ set g_balance_campingrifle_primary_bulletconstant 130 // 56.3qu
 set g_balance_campingrifle_primary_burstcost 0.35 // require same cooldown as secondary, note it's smaller than primary refire time
 set g_balance_campingrifle_primary_bullethail 0
 set g_balance_campingrifle_secondary 1
+set g_balance_campingrifle_secondary_tracer 0
 set g_balance_campingrifle_secondary_damage 15
 set g_balance_campingrifle_secondary_headshotaddeddamage 25
 set g_balance_campingrifle_secondary_spread 0.02
index 4c9095a1ad7a51e8c49bb328d4343249030c8514..d43d82c28d40da6c5a8d4fdfdf1c18940e536490 100644 (file)
@@ -437,6 +437,7 @@ set g_balance_nex_secondary_damagefalloff_forcehalflife 1500
 set g_balance_nex_velocitydependent_halflife 0
 set g_balance_nex_velocitydependent_minspeed 400
 set g_balance_nex_velocitydependent_maxspeed 1000
+set g_balance_nex_velocitydependent_falloff_factor 0.001
 // }}}
 // {{{ minstanex
 set g_balance_minstanex_refire 1
@@ -561,7 +562,7 @@ set g_balance_campingrifle_magazinecapacity 0
 set g_balance_campingrifle_reloadtime 2 // matches reload anim
 set g_balance_campingrifle_auto_reload_after_changing_weapons 0
 set g_balance_campingrifle_bursttime 0.85 // 0.35 - 0.1 + 0.35 - 0.1 + 0.35 = three secondaries
-set g_balance_campingrifle_tracer 1
+set g_balance_campingrifle_primary_tracer 0
 set g_balance_campingrifle_primary_damage 50
 set g_balance_campingrifle_primary_headshotaddeddamage 50
 set g_balance_campingrifle_primary_spread 0
@@ -575,6 +576,7 @@ set g_balance_campingrifle_primary_bulletconstant 130 // 56.3qu
 set g_balance_campingrifle_primary_burstcost 0.35 // require same cooldown as secondary, note it's smaller than primary refire time
 set g_balance_campingrifle_primary_bullethail 0
 set g_balance_campingrifle_secondary 1
+set g_balance_campingrifle_secondary_tracer 0
 set g_balance_campingrifle_secondary_damage 15
 set g_balance_campingrifle_secondary_headshotaddeddamage 25
 set g_balance_campingrifle_secondary_spread 0.02
index 925e5ea106e51e9d5e69c002f25fd9166f5d063f..0dfe80d5502b4ff9c29b04280185aab95beb74f1 100644 (file)
@@ -255,12 +255,12 @@ set g_balance_shotgun_secondary_animtime 1
 // }}}
 // {{{ uzi
 set g_balance_uzi_first 1
-set g_balance_uzi_first_damage 17
+set g_balance_uzi_first_damage 16
 set g_balance_uzi_first_force 35
 set g_balance_uzi_first_spread 0.03
 set g_balance_uzi_first_refire 0.2
 set g_balance_uzi_first_ammo 2
-set g_balance_uzi_sustained_damage 12
+set g_balance_uzi_sustained_damage 9
 set g_balance_uzi_sustained_force 7.5
 set g_balance_uzi_sustained_spread 0.1
 set g_balance_uzi_sustained_refire 0.1
@@ -298,7 +298,7 @@ set g_balance_grenadelauncher_secondary_speed 1200
 set g_balance_grenadelauncher_secondary_speed_up 225
 set g_balance_grenadelauncher_secondary_speed_z 0
 set g_balance_grenadelauncher_secondary_spread 0
-set g_balance_grenadelauncher_secondary_lifetime 5
+set g_balance_grenadelauncher_secondary_lifetime 3
 set g_balance_grenadelauncher_secondary_lifetime2 0.65
 set g_balance_grenadelauncher_secondary_refire 0.8
 set g_balance_grenadelauncher_secondary_animtime 0.4
@@ -431,12 +431,13 @@ set g_balance_nex_secondary_animtime 0.75
 set g_balance_nex_secondary_ammo 5
 set g_balance_nex_secondary_damagefalloff_mindist 500
 set g_balance_nex_secondary_damagefalloff_maxdist 4500
-set g_balance_nex_secondary_damagefalloff_halflife 2000
-set g_balance_nex_secondary_damagefalloff_forcehalflife 2000
+set g_balance_nex_secondary_damagefalloff_halflife 4000
+set g_balance_nex_secondary_damagefalloff_forcehalflife 4000
 
 set g_balance_nex_velocitydependent_halflife -500
 set g_balance_nex_velocitydependent_minspeed 400
 set g_balance_nex_velocitydependent_maxspeed 1000
+set g_balance_nex_velocitydependent_falloff_factor 0.001
 // }}}
 // {{{ minstanex
 set g_balance_minstanex_refire 1.25
@@ -561,7 +562,7 @@ set g_balance_campingrifle_magazinecapacity 8 // make it pretty much useless in
 set g_balance_campingrifle_reloadtime 2 // matches reload anim
 set g_balance_campingrifle_auto_reload_after_changing_weapons 0
 set g_balance_campingrifle_bursttime 0
-set g_balance_campingrifle_tracer 1
+set g_balance_campingrifle_primary_tracer 1
 set g_balance_campingrifle_primary_damage 75
 set g_balance_campingrifle_primary_headshotaddeddamage 75
 set g_balance_campingrifle_primary_spread 0
@@ -575,14 +576,15 @@ set g_balance_campingrifle_primary_bulletconstant 130 // 56.3qu
 set g_balance_campingrifle_primary_burstcost 0
 set g_balance_campingrifle_primary_bullethail 0 // empty magazine on shot
 set g_balance_campingrifle_secondary 1
-set g_balance_campingrifle_secondary_damage 25
-set g_balance_campingrifle_secondary_headshotaddeddamage 25 // 50 damage only on head
-set g_balance_campingrifle_secondary_spread 0.008
-set g_balance_campingrifle_secondary_force 1
-set g_balance_campingrifle_secondary_speed 20000
+set g_balance_campingrifle_secondary_tracer 0
+set g_balance_campingrifle_secondary_damage 50
+set g_balance_campingrifle_secondary_headshotaddeddamage 50 // 50 damage only on head
+set g_balance_campingrifle_secondary_spread 0
+set g_balance_campingrifle_secondary_force 2
+set g_balance_campingrifle_secondary_speed 30000
 set g_balance_campingrifle_secondary_lifetime 5
-set g_balance_campingrifle_secondary_refire 0.15
-set g_balance_campingrifle_secondary_animtime 0.1
+set g_balance_campingrifle_secondary_refire 1.5
+set g_balance_campingrifle_secondary_animtime 1.4
 set g_balance_campingrifle_secondary_ammo 10
 set g_balance_campingrifle_secondary_bulletconstant 130 // 18.3qu
 set g_balance_campingrifle_secondary_burstcost 0
index 4116ae438241bf98c1d92ae2002bd69999262615..e78e636a4501e04e2e69c69259a01d415e1e06c3 100644 (file)
@@ -4988,7 +4988,8 @@ lightcolor 3.125 4.375 10
 effect electro_lightning
 count 300
 type spark
-color 0x501860 0x501860 // 0x202020 0x404040
+// color 0x501860 0x501860 // 0x202020 0x404040
+color 0x2030FF 0x80C0FF
 tex 65 65
 size 6 6
 alpha 100 206 1724
index f0dce9dc42bd18fce9ab34d41555c2695956884f..5fce1ef258582d741089a8c8ecbae7d981f83295 100644 (file)
Binary files a/models/weapons/g_minelayer.md3 and b/models/weapons/g_minelayer.md3 differ
index 5d06b3c0667e1fba9319313b19059f211d7e7b25..4c7d4498f645d8752aba0474ccba834442e04449 100644 (file)
Binary files a/models/weapons/v_minelayer.md3 and b/models/weapons/v_minelayer.md3 differ
index 15064cec481a97b3be4b6bf9871b6d3467e80079..2aa34493554455e14dc8bddf5fe7b5556350ed8f 100644 (file)
Binary files a/particles/lgbeam.tga and b/particles/lgbeam.tga differ
index 4e5380f33239755ecf51b85de28c4a73627c30bd..6798261eb3555f9dc1ae707973911428483f32c2 100644 (file)
@@ -263,5 +263,7 @@ float nex_scope;
 
 float nex_minvelocity;
 float nex_maxvelocity;
+float nex_speed_falloff_factor;
+float nex_speed;
 
 float cr_maxbullets;
index 9feef58cc8738836ded4e6b168adf4c8e2e8786d..28db128b06d52f379c76bf71d989fb58680926a0 100644 (file)
@@ -1354,6 +1354,7 @@ float CSQC_Parse_TempEntity()
                case TE_CSQC_NEX_VELOCITY:
                        nex_minvelocity = ReadShort();
                        nex_maxvelocity = ReadShort();
+                       nex_speed_falloff_factor = ReadShort()/10000;
                        bHandled = true;
                        break;
                case TE_CSQC_CR_MAXBULLETS:
index f91089844cd5eb0fabeab69a71f0d9b9f71444b7..5ee028d46b629b8608eb0778a5c3143d370136a9 100644 (file)
@@ -622,6 +622,8 @@ void CSQC_UpdateView(float w, float h)
        // the view to go back to normal, so reticle_type would become 0 as we fade out)
        if(spectatee_status || getstati(STAT_HEALTH) <= 0)
                reticle_type = 0; // prevent reticle from showing during the respawn zoom effect or for spectators
+       else if(activeweapon == WEP_NEX && (button_zoom || zoomscript_caught) || activeweapon == WEP_CAMPINGRIFLE && (button_zoom || zoomscript_caught) || activeweapon == WEP_MINSTANEX && (button_zoom || zoomscript_caught))
+               reticle_type = 2; // nex zoom
        else if(button_zoom || zoomscript_caught)
                reticle_type = 1; // normal zoom
        else if(activeweapon == WEP_NEX && button_attack2 || activeweapon == WEP_CAMPINGRIFLE && button_attack2)
@@ -828,22 +830,28 @@ void CSQC_UpdateView(float w, float h)
 
                                float f, a;
                                wcross_size = drawgetimagesize(wcross_name) * wcross_scale;
+
+                               float xyspeed;
+                               xyspeed = vlen('1 0 0' * pmove_vel_x + '0 1 0' * pmove_vel_y);
+                               if(xyspeed > nex_speed)
+                                       nex_speed = min(xyspeed, nex_maxvelocity);
+                               else
+                                       nex_speed = (1 - nex_speed_falloff_factor) * nex_speed;
+
                                // ring around crosshair representing bullets left in camping rifle clip
                                if (activeweapon == WEP_CAMPINGRIFLE && cr_maxbullets)
                                {
                                        bullets = getstati(STAT_BULLETS_LOADED);
-                                       a = cvar("crosshair_campingrifle_bulletcounter_alpha");
                                        f = bound(0, bullets / cr_maxbullets, 1);
 
+                                       a = cvar("crosshair_campingrifle_bulletcounter_alpha");
                                        DrawCircleClippedPic(wcross_origin, wcross_size_x * ring_scale, "gfx/crosshair_ring.tga", f, wcross_color, wcross_alpha * a, DRAWFLAG_ADDITIVE);
                                }
                                else if (activeweapon == WEP_NEX) // ring around crosshair representing velocity-dependent damage for the nex
                                {
-                                       float curvel;
-                                       a = cvar("crosshair_nexvelocity_alpha");
-                                       curvel = vlen('1 0 0' * pmove_vel_x + '0 1 0' * pmove_vel_y);
-                                       f = bound(0, (curvel - nex_minvelocity) / (nex_maxvelocity - nex_minvelocity), 1);
+                                       f = bound(0, (nex_speed - nex_minvelocity) / (nex_maxvelocity - nex_minvelocity), 1);
 
+                                       a = cvar("crosshair_nexvelocity_alpha");
                                        DrawCircleClippedPic(wcross_origin, wcross_size_x * ring_scale, "gfx/crosshair_ring.tga", f, wcross_color, wcross_alpha * a, DRAWFLAG_ADDITIVE);
                                }
 
index c601d92cda70d478dd0189c486807a252783f32d..5c980920b7228a5dcc37681bca3e7b3fa855afd1 100644 (file)
@@ -12,6 +12,7 @@ void send_CSQC_nexvelocity(entity e) {
        WriteByte(MSG_ONE, TE_CSQC_NEX_VELOCITY);
        WriteShort(MSG_ONE, cvar("g_balance_nex_velocitydependent_minspeed"));
        WriteShort(MSG_ONE, cvar("g_balance_nex_velocitydependent_maxspeed"));
+       WriteShort(MSG_ONE, cvar("g_balance_nex_velocitydependent_falloff_factor") * 10000);
 }
 
 void send_CSQC_cr_maxbullets(entity e) {
index 2df6c1c4fefb2ffbad069cb587cd27e82f22bdff..c9531bbc630d45f2cca4bfc2aeb97e5b248e2072 100644 (file)
@@ -37,6 +37,8 @@ float sv_airspeedlimit_nonqw;
 .float multijump_ready;
 .float prevjumpbutton;
 
+.float nexspeed;
+
 /*
 =============
 PlayerJump
@@ -1323,6 +1325,15 @@ void SV_PlayerPhysics()
                        }
                }
        }
+
+       float f;
+       float xyspeed;
+       f = cvar("g_balance_nex_velocitydependent_falloff_factor");
+       xyspeed = vlen('1 0 0' * self.velocity_x + '0 1 0' * self.velocity_y);
+       if(xyspeed > self.nexspeed)
+               self.nexspeed = min(xyspeed, cvar("g_balance_nex_velocitydependent_maxspeed"));
+       else
+               self.nexspeed = (1 - f) * self.nexspeed;
 :end
        if(self.flags & FL_ONGROUND)
                self.lastground = time;
index 1cd280e007b531f7f23122fbde2c16890e7fa9f3..d0b6f4ed8836b449143539af5d3c0e6a3dbe8b93 100644 (file)
@@ -96,7 +96,10 @@ void W_CampingRifle_FireBullet(float pSpread, float pDamage, float pHeadshotAdde
                w_shotorg = self.origin + self.view_ofs + ((w_shotorg - self.origin - self.view_ofs) * v_forward) * v_forward;
        }
 
-       fireBallisticBullet(w_shotorg, w_shotdir, pSpread, pSpeed, pLifetime, pDamage, pHeadshotAddedDamage / pDamage, pForce, deathtype, (cvar("g_balance_campingrifle_tracer") ? EF_RED : EF_BLUE), 1, pBulletConstant);
+       if(deathtype & HITTYPE_SECONDARY)
+               fireBallisticBullet(w_shotorg, w_shotdir, pSpread, pSpeed, pLifetime, pDamage, pHeadshotAddedDamage / pDamage, pForce, deathtype, (cvar("g_balance_campingrifle_secondary_tracer") ? EF_RED : EF_BLUE), 1, pBulletConstant);
+       else
+               fireBallisticBullet(w_shotorg, w_shotdir, pSpread, pSpeed, pLifetime, pDamage, pHeadshotAddedDamage / pDamage, pForce, deathtype, (cvar("g_balance_campingrifle_primary_tracer") ? EF_RED : EF_BLUE), 1, pBulletConstant);
        endFireBallisticBullet();
 
        if (cvar("g_casings") >= 2)
index 8acf9f4c6b12c90727bf1d357f3e06eb8f873e93..87d0c88ab53fae69c7e3a9151c9ed31c2eccbccf 100644 (file)
@@ -43,7 +43,7 @@ void W_Nex_Attack (float issecondary)
        float flying;
        flying = IsFlying(self); // do this BEFORE to make the trace values from FireRailgunBullet last
 
-       f = ExponentialFalloff(cvar("g_balance_nex_velocitydependent_minspeed"), cvar("g_balance_nex_velocitydependent_maxspeed"), cvar("g_balance_nex_velocitydependent_halflife"), vlen('1 0 0' * self.velocity_x + '0 1 0' * self.velocity_y));
+       f = ExponentialFalloff(cvar("g_balance_nex_velocitydependent_minspeed"), cvar("g_balance_nex_velocitydependent_maxspeed"), cvar("g_balance_nex_velocitydependent_halflife"), self.nexspeed);
 
        // TODO: make it more obvious (through effects, indicator on weapon) that damage increases when speed increases
        mydmg *= f;