]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
also add jointime parameter
authorRudolf Polzer <divverent@alientrap.org>
Thu, 11 Nov 2010 21:52:16 +0000 (22:52 +0100)
committerRudolf Polzer <divverent@alientrap.org>
Thu, 11 Nov 2010 21:52:16 +0000 (22:52 +0100)
balance25.cfg
balanceLeeStricklin.cfg
balanceNexSVN.cfg
balanceSamual.cfg
balanceTest.cfg
balanceXonotic.cfg
balancetZork.cfg
qcsrc/server/w_crylink.qc

index 4a32553efc49416675a2e1f65737ce22c4a676bb..dbf2c8ea1d3a68b070ed1dfbd5e96cff0b900b91 100644 (file)
@@ -394,6 +394,7 @@ set g_balance_crylink_primary_animtime 0.3
 set g_balance_crylink_primary_ammo 2
 set g_balance_crylink_primary_bouncedamagefactor 0.5
 set g_balance_crylink_primary_joinspeed 0
+set g_balance_crylink_primary_jointime 0
 set g_balance_crylink_primary_linkexplode 1
 
 set g_balance_crylink_primary_middle_lifetime 5 // range: 35000 full, fades to 70000
@@ -415,6 +416,7 @@ set g_balance_crylink_secondary_animtime 0.3
 set g_balance_crylink_secondary_ammo 2
 set g_balance_crylink_secondary_bouncedamagefactor 0.5
 set g_balance_crylink_secondary_joinspeed 0
+set g_balance_crylink_secondary_jointime 0
 set g_balance_crylink_secondary_linkexplode 1
 
 set g_balance_crylink_secondary_middle_lifetime 5 // range: 35000 full, fades to 70000
index 353286f5c95ed5bf8be651a10f2bbc4f439a0466..fa2c255a3cf69480d8e5ac67162565254b638c15 100644 (file)
@@ -405,6 +405,7 @@ set g_balance_crylink_primary_animtime 0.30008
 set g_balance_crylink_primary_ammo 3
 set g_balance_crylink_primary_bouncedamagefactor 0.2
 set g_balance_crylink_primary_joinspeed 0
+set g_balance_crylink_primary_jointime 0
 set g_balance_crylink_primary_linkexplode 1
 
 set g_balance_crylink_primary_middle_lifetime 5 // range: 10000 full, fades to 20000
@@ -426,6 +427,7 @@ set g_balance_crylink_secondary_animtime 0.3
 set g_balance_crylink_secondary_ammo 3
 set g_balance_crylink_secondary_bouncedamagefactor 0.5
 set g_balance_crylink_secondary_joinspeed 0
+set g_balance_crylink_secondary_jointime 0
 set g_balance_crylink_secondary_linkexplode 1
 
 set g_balance_crylink_secondary_middle_lifetime 5 // range: 10000 full, fades to 10000
index 3b30bd768c0abf2aa4f669a383a34a0a3f1453df..cd8cb05d59e2c0d1d8089dc986a66ac2efd0204b 100644 (file)
@@ -393,6 +393,7 @@ set g_balance_crylink_primary_animtime 0.3
 set g_balance_crylink_primary_ammo 2
 set g_balance_crylink_primary_bouncedamagefactor 0.5
 set g_balance_crylink_primary_joinspeed 0
+set g_balance_crylink_primary_jointime 0
 set g_balance_crylink_primary_linkexplode 1
 
 set g_balance_crylink_primary_middle_lifetime 5 // range: 35000 full, fades to 70000
@@ -414,6 +415,7 @@ set g_balance_crylink_secondary_animtime 0.3
 set g_balance_crylink_secondary_ammo 2
 set g_balance_crylink_secondary_bouncedamagefactor 0.5
 set g_balance_crylink_secondary_joinspeed 0
+set g_balance_crylink_secondary_jointime 0
 set g_balance_crylink_secondary_linkexplode 1
 
 set g_balance_crylink_secondary_middle_lifetime 5 // range: 35000 full, fades to 70000
index e33f740b20763fade1c8ba748e3726d574ecdf79..94ec2627930222be44fa214fd7c6848d2c14d370 100644 (file)
@@ -394,6 +394,7 @@ set g_balance_crylink_primary_animtime 0.3
 set g_balance_crylink_primary_ammo 2
 set g_balance_crylink_primary_bouncedamagefactor 0.5
 set g_balance_crylink_primary_joinspeed 0
+set g_balance_crylink_primary_jointime 0
 set g_balance_crylink_primary_linkexplode 1
 
 set g_balance_crylink_primary_middle_lifetime 5 // range: 35000 full, fades to 70000
@@ -415,6 +416,7 @@ set g_balance_crylink_secondary_animtime 0.1
 set g_balance_crylink_secondary_ammo 2
 set g_balance_crylink_secondary_bouncedamagefactor 0.5
 set g_balance_crylink_secondary_joinspeed 0
+set g_balance_crylink_secondary_jointime 0
 set g_balance_crylink_secondary_linkexplode 1
 
 set g_balance_crylink_secondary_middle_lifetime 5 // range: 35000 full, fades to 70000
index c75500c4453d1fd22f55d1cd076a0917f6a53be0..37cc8be55ee4404a726827e6411ca998d0a06ee3 100644 (file)
@@ -394,6 +394,7 @@ set g_balance_crylink_primary_animtime 0.4
 set g_balance_crylink_primary_ammo 2
 set g_balance_crylink_primary_bouncedamagefactor 0.2
 set g_balance_crylink_primary_joinspeed 250
+set g_balance_crylink_primary_jointime 0
 set g_balance_crylink_primary_linkexplode 0
 
 set g_balance_crylink_primary_middle_lifetime 5 // range: 10000 full, fades to 20000
@@ -415,6 +416,7 @@ set g_balance_crylink_secondary_animtime 0.15
 set g_balance_crylink_secondary_ammo 1
 set g_balance_crylink_secondary_bouncedamagefactor 0.5
 set g_balance_crylink_secondary_joinspeed 250
+set g_balance_crylink_secondary_jointime 0
 set g_balance_crylink_secondary_linkexplode 0
 
 set g_balance_crylink_secondary_middle_lifetime 5 // range: 10000 full, fades to 10000
index 6205fb1fce12353dac24332794b80624772bbe83..2b2c16e6654efd8dd2d904543ebc1b57c10cb063 100644 (file)
@@ -394,6 +394,7 @@ set g_balance_crylink_primary_animtime 0.4
 set g_balance_crylink_primary_ammo 2
 set g_balance_crylink_primary_bouncedamagefactor 0.2
 set g_balance_crylink_primary_joinspeed 250
+set g_balance_crylink_primary_jointime 0
 set g_balance_crylink_primary_linkexplode 0
 
 set g_balance_crylink_primary_middle_lifetime 5 // range: 10000 full, fades to 20000
@@ -415,6 +416,7 @@ set g_balance_crylink_secondary_animtime 0.15
 set g_balance_crylink_secondary_ammo 1
 set g_balance_crylink_secondary_bouncedamagefactor 0.5
 set g_balance_crylink_secondary_joinspeed 0
+set g_balance_crylink_secondary_jointime 0
 set g_balance_crylink_secondary_linkexplode 1
 
 set g_balance_crylink_secondary_middle_lifetime 5 // range: 10000 full, fades to 10000
index e3fd4d5d152de9113176c1309ae514d0956d67bf..56ea71c184e93a1630b750b60d2704b8ee817804 100644 (file)
@@ -395,6 +395,7 @@ set g_balance_crylink_primary_animtime 0.4
 set g_balance_crylink_primary_ammo 2
 set g_balance_crylink_primary_bouncedamagefactor 0.2
 set g_balance_crylink_primary_joinspeed 0
+set g_balance_crylink_primary_jointime 0
 set g_balance_crylink_secondary_linkexplode 1
 
 set g_balance_crylink_primary_middle_lifetime 5 // range: 10000 full, fades to 20000
@@ -416,6 +417,7 @@ set g_balance_crylink_secondary_animtime 0.15
 set g_balance_crylink_secondary_ammo 1
 set g_balance_crylink_secondary_bouncedamagefactor 0.5
 set g_balance_crylink_secondary_joinspeed 0
+set g_balance_crylink_secondary_jointime 0
 set g_balance_crylink_primary_linkexplode 1
 
 set g_balance_crylink_secondary_middle_lifetime 5 // range: 10000 full, fades to 10000
index bd0ae4e795552b15ff1deadf7036711207dd0365..2dcd433c7e27d533de6fe3d299065259fb0107f2 100644 (file)
@@ -44,8 +44,10 @@ void W_Crylink_LinkExplode (entity e, entity e2)
 // stored in w_crylink_linkjoin_time.
 // could possibly network this origin and time, and display a special particle
 // effect when projectiles meet there :P
+// jspeed: MINIMUM jing speed
+// jtime: MAXIMUM jing time (0: none)
 float w_crylink_linkjoin_time;
-vector W_Crylink_LinkJoin(entity e, float joinspeed)
+vector W_Crylink_LinkJoin(entity e, float jspeed, float jtime)
 {
        vector avg_origin, avg_velocity;
        vector targ_origin;
@@ -79,7 +81,7 @@ vector W_Crylink_LinkJoin(entity e, float joinspeed)
        if(avg_dist == 0)
                return avg_origin; // no change needed
 
-       if(joinspeed == 0)
+       if(jspeed == 0 && jtime == 0)
        {
                e.velocity = avg_velocity;
                UpdateCSQCProjectile(e);
@@ -91,27 +93,33 @@ vector W_Crylink_LinkJoin(entity e, float joinspeed)
        }
        else
        {
-               w_crylink_linkjoin_time = avg_dist / joinspeed;
+               if(jtime)
+               {
+                       if(jspeed)
+                               w_crylink_linkjoin_time = min(jtime, avg_dist / jspeed);
+                       else
+                               w_crylink_linkjoin_time = jtime;
+               }
                targ_origin = avg_origin + w_crylink_linkjoin_time * avg_velocity;
 
-               e.velocity = (targ_origin - e.origin) * (joinspeed / avg_dist);
+               e.velocity = (targ_origin - e.origin) * (1.0 / w_crylink_linkjoin_time);
                UpdateCSQCProjectile(e);
                for(p = e; (p = p.queuenext) != e; )
                {
-                       p.velocity = WarpZone_RefSys_TransformVelocity(e, p, (targ_origin - WarpZone_RefSys_TransformOrigin(p, e, p.origin)) * (joinspeed / avg_dist));
+                       p.velocity = WarpZone_RefSys_TransformVelocity(e, p, (targ_origin - WarpZone_RefSys_TransformOrigin(p, e, p.origin)) * (1.0 / w_crylink_linkjoin_time));
                        UpdateCSQCProjectile(p);
                }
 
                // analysis:
-               //   joinspeed -> +infinity:
+               //   jspeed -> +infinity:
                //      w_crylink_linkjoin_time -> +0
                //      targ_origin -> avg_origin
                //      p->velocity -> HUEG towards center
-               //   joinspeed -> 0:
+               //   jspeed -> 0:
                //      w_crylink_linkjoin_time -> +/- infinity
                //      targ_origin -> avg_velocity * +/- infinity
                //      p->velocity -> avg_velocity
-               //   joinspeed -> -infinity:
+               //   jspeed -> -infinity:
                //      w_crylink_linkjoin_time -> -0
                //      targ_origin -> avg_origin
                //      p->velocity -> HUEG away from center
@@ -468,11 +476,11 @@ float w_crylink(float req)
                                        vector pos;
                                        if(self.crylink_waitrelease == 1)
                                        {
-                                               pos = W_Crylink_LinkJoin(self.crylink_lastgroup, cvar("g_balance_crylink_primary_joinspeed"));
+                                               pos = W_Crylink_LinkJoin(self.crylink_lastgroup, cvar("g_balance_crylink_primary_joinspeed"), cvar("g_balance_crylink_primary_jointime"));
                                        }
                                        else
                                        {
-                                               pos = W_Crylink_LinkJoin(self.crylink_lastgroup, cvar("g_balance_crylink_secondary_joinspeed"));
+                                               pos = W_Crylink_LinkJoin(self.crylink_lastgroup, cvar("g_balance_crylink_secondary_joinspeed"), cvar("g_balance_crylink_secondary_jointime"));
                                        }
 
                                        entity linkjoineffect;