]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
seeker: make accel/decel consistent with rocket launcher and ticrate independent
authorRudolf Polzer <divverent@alientrap.org>
Sat, 4 Dec 2010 11:13:47 +0000 (12:13 +0100)
committerRudolf Polzer <divverent@alientrap.org>
Sat, 4 Dec 2010 11:13:47 +0000 (12:13 +0100)
balance25.cfg
balanceLeeStricklin.cfg
balanceSamual.cfg
balanceXonotic.cfg
balancetZork.cfg
qcsrc/server/w_seeker.qc

index a5d3b68f10739859db58f0a2a57511ccfa538f7e..d316ce82326806d006fc141b8a54763fb9d7f8e6 100644 (file)
@@ -696,13 +696,13 @@ set g_balance_seeker_flac_speed 3000
 set g_balance_seeker_flac_speed_up 1000
 set g_balance_seeker_flac_speed_z 0
 set g_balance_seeker_flac_spread 0.4
-set g_balance_seeker_missile_accel 1.05
+set g_balance_seeker_missile_accel 3000
 set g_balance_seeker_missile_ammo 2
 set g_balance_seeker_missile_animtime 0.3
 set g_balance_seeker_missile_count 4
 set g_balance_seeker_missile_damage 40
 set g_balance_seeker_missile_damageforcescale 4
-set g_balance_seeker_missile_decel 0.9
+set g_balance_seeker_missile_decel 6000
 set g_balance_seeker_missile_delay 0.25
 set g_balance_seeker_missile_edgedamage 10
 set g_balance_seeker_missile_force 250
@@ -718,7 +718,6 @@ set g_balance_seeker_missile_smart_mindist 800
 set g_balance_seeker_missile_smart_trace_max 2500
 set g_balance_seeker_missile_smart_trace_min 1000
 set g_balance_seeker_missile_speed 700
-set g_balance_seeker_missile_speed_accel 0
 set g_balance_seeker_missile_speed_up 300
 set g_balance_seeker_missile_speed_z 0
 set g_balance_seeker_missile_speed_max 1250
index baca6f9f31b9f80f828633156d656feb65a78043..064b72c76272fe5052825f0d601e668f2b55b884 100644 (file)
@@ -696,13 +696,13 @@ set g_balance_seeker_flac_speed 3000
 set g_balance_seeker_flac_speed_up 1000
 set g_balance_seeker_flac_speed_z 0
 set g_balance_seeker_flac_spread 0.4
-set g_balance_seeker_missile_accel 1.05
+set g_balance_seeker_missile_accel 3000
 set g_balance_seeker_missile_ammo 2
 set g_balance_seeker_missile_animtime 0.3
 set g_balance_seeker_missile_count 8
 set g_balance_seeker_missile_damage 25
 set g_balance_seeker_missile_damageforcescale 4
-set g_balance_seeker_missile_decel 0.9
+set g_balance_seeker_missile_decel 6000
 set g_balance_seeker_missile_delay 0.25
 set g_balance_seeker_missile_edgedamage 10
 set g_balance_seeker_missile_force 250
@@ -718,7 +718,6 @@ set g_balance_seeker_missile_smart_mindist 800
 set g_balance_seeker_missile_smart_trace_max 2500
 set g_balance_seeker_missile_smart_trace_min 1000
 set g_balance_seeker_missile_speed 700
-set g_balance_seeker_missile_speed_accel 0
 set g_balance_seeker_missile_speed_up 300
 set g_balance_seeker_missile_speed_z 0
 set g_balance_seeker_missile_speed_max 1250
index 2935a2cca0b687624298f154419e80dc7ed29256..c39a9c64633a43936074fab71f69caf2b43fb7fd 100644 (file)
@@ -696,13 +696,13 @@ set g_balance_seeker_flac_speed 3000
 set g_balance_seeker_flac_speed_up 1000
 set g_balance_seeker_flac_speed_z 0
 set g_balance_seeker_flac_spread 0.4
-set g_balance_seeker_missile_accel 1.05
+set g_balance_seeker_missile_accel 3000
 set g_balance_seeker_missile_ammo 2
 set g_balance_seeker_missile_animtime 0.3
 set g_balance_seeker_missile_count 4
 set g_balance_seeker_missile_damage 40
 set g_balance_seeker_missile_damageforcescale 4
-set g_balance_seeker_missile_decel 0.9
+set g_balance_seeker_missile_decel 6000
 set g_balance_seeker_missile_delay 0.25
 set g_balance_seeker_missile_edgedamage 10
 set g_balance_seeker_missile_force 250
@@ -718,7 +718,6 @@ set g_balance_seeker_missile_smart_mindist 800
 set g_balance_seeker_missile_smart_trace_max 2500
 set g_balance_seeker_missile_smart_trace_min 1000
 set g_balance_seeker_missile_speed 700
-set g_balance_seeker_missile_speed_accel 0
 set g_balance_seeker_missile_speed_up 300
 set g_balance_seeker_missile_speed_z 0
 set g_balance_seeker_missile_speed_max 1250
index 563318a687872bc3411b9305964ee60c7dcb2bc4..1edf010f36baf0e5104ef49cfb42684262848953 100644 (file)
@@ -700,13 +700,13 @@ set g_balance_seeker_flac_speed 3000
 set g_balance_seeker_flac_speed_up 1000
 set g_balance_seeker_flac_speed_z 0
 set g_balance_seeker_flac_spread 0.4
-set g_balance_seeker_missile_accel 1.05
+set g_balance_seeker_missile_accel 1400
 set g_balance_seeker_missile_ammo 2
 set g_balance_seeker_missile_animtime 0.3
 set g_balance_seeker_missile_count 8
 set g_balance_seeker_missile_damage 15
 set g_balance_seeker_missile_damageforcescale 4
-set g_balance_seeker_missile_decel 0.9
+set g_balance_seeker_missile_decel 1400
 set g_balance_seeker_missile_delay 0.25
 set g_balance_seeker_missile_edgedamage 10
 set g_balance_seeker_missile_force 250
@@ -722,10 +722,9 @@ set g_balance_seeker_missile_smart_mindist 800
 set g_balance_seeker_missile_smart_trace_max 2500
 set g_balance_seeker_missile_smart_trace_min 1000
 set g_balance_seeker_missile_speed 700
-set g_balance_seeker_missile_speed_accel 0
 set g_balance_seeker_missile_speed_up 300
 set g_balance_seeker_missile_speed_z 0
-set g_balance_seeker_missile_speed_max 1250
+set g_balance_seeker_missile_speed_max 1400
 set g_balance_seeker_missile_spread 0
 set g_balance_seeker_missile_turnrate 0.65
 set g_balance_seeker_tag_ammo 1
@@ -734,6 +733,6 @@ set g_balance_seeker_tag_damageforcescale 4
 set g_balance_seeker_tag_health 5
 set g_balance_seeker_tag_lifetime 15
 set g_balance_seeker_tag_refire 0.7
-set g_balance_seeker_tag_speed 9000
+set g_balance_seeker_tag_speed 5000
 set g_balance_seeker_tag_spread 0
 // End new seeker
index 58b3e3c276a4c1eb2d0b466b99c8925850efe6c9..2da45b691061bf08ba703a304ebd9810a0df333b 100644 (file)
@@ -717,13 +717,13 @@ set g_balance_seeker_flac_speed_up 500
 set g_balance_seeker_flac_speed_z 0
 set g_balance_seeker_flac_spread 0.25
 
-set g_balance_seeker_missile_accel 1.05
+set g_balance_seeker_missile_accel 3000
 set g_balance_seeker_missile_ammo 2
 set g_balance_seeker_missile_animtime 0.3
 set g_balance_seeker_missile_count 4
 set g_balance_seeker_missile_damage 50
 set g_balance_seeker_missile_damageforcescale 2
-set g_balance_seeker_missile_decel 0.9
+set g_balance_seeker_missile_decel 6000
 set g_balance_seeker_missile_delay 0.25
 set g_balance_seeker_missile_edgedamage 10
 set g_balance_seeker_missile_force 250
@@ -739,7 +739,6 @@ set g_balance_seeker_missile_smart_mindist 800
 set g_balance_seeker_missile_smart_trace_max 2500
 set g_balance_seeker_missile_smart_trace_min 1000
 set g_balance_seeker_missile_speed 700
-set g_balance_seeker_missile_speed_accel 0
 set g_balance_seeker_missile_speed_up 300
 set g_balance_seeker_missile_speed_z 0
 set g_balance_seeker_missile_speed_max 1250
index 09c7ec85acd080acec35f836b77eb8c3cb8482ae..6ee8ff07d2d4318d865cfe132c103d357f1c99da 100644 (file)
@@ -2,7 +2,6 @@
 REGISTER_WEAPON(SEEKER, w_seeker, IT_ROCKETS, 9, WEP_FLAG_NORMAL | WEP_TYPE_SPLASH, BOT_PICKUP_RATING_MID, "seeker", "seeker", "T.A.G. Seeker");
 #else
 #ifdef SVQC
-//.float speed; = switchweapon
 //.float proxytime; = autoswitch
 //.float tl; = wait
 
@@ -27,6 +26,7 @@ void Seeker_Missile_Think()
        vector desireddir, olddir, newdir, eorg;
        float turnrate;
        float dist;
+       float spd;
 
        if (time > self.cnt)
        {
@@ -34,14 +34,12 @@ void Seeker_Missile_Think()
                Seeker_Missile_Explode();
        }
 
-       if (!self.switchweapon)
-               self.switchweapon = cvar("g_balance_seeker_missile_speed");
-
-       if ((self.switchweapon < cvar("g_balance_seeker_missile_speed_max")) && cvar("g_balance_seeker_missile_speed_accel"))
-               self.switchweapon = self.switchweapon * cvar("g_balance_seeker_missile_accel");
-
-       if (self.switchweapon > cvar("g_balance_seeker_missile_speed_max"))
-               self.switchweapon = self.switchweapon * cvar("g_balance_seeker_missile_decel");
+       spd = vlen(self.velocity);
+       spd = bound(
+               spd - cvar("g_balance_seeker_missile_decel") * frametime,
+               cvar("g_balance_seeker_missile_speed_max"),
+               spd + cvar("g_balance_seeker_missile_accel") * frametime
+       );
 
        if (self.enemy != world)
                if (self.enemy.takedamage != DAMAGE_AIM || self.enemy.deadflag != DEAD_NO)
@@ -73,7 +71,7 @@ void Seeker_Missile_Think()
                }
                
                newdir = normalize(olddir + desireddir * turnrate); // take the average of the 2 directions; not the best method but simple & easy
-               self.velocity = newdir * self.switchweapon; // make me fly in the new direction at my flight speed
+               self.velocity = newdir * spd; // make me fly in the new direction at my flight speed
        }
 
        // Proxy
@@ -197,7 +195,6 @@ void Seeker_Fire_Missile(vector f_diff)
        missile.flags       = FL_PROJECTILE;
        W_SETUPPROJECTILEVELOCITY_UP(missile, g_balance_seeker_missile);
 
-       missile.switchweapon = vlen(missile.velocity);
        missile.angles = vectoangles (missile.velocity);
 
        CSQCProjectile(missile, FALSE, PROJECTILE_SEEKER, TRUE);