From: Rudolf Polzer Date: Sat, 4 Dec 2010 11:13:47 +0000 (+0100) Subject: seeker: make accel/decel consistent with rocket launcher and ticrate independent X-Git-Tag: xonotic-v0.1.0preview~65^2~20 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=ef3ff3e9289b0b7a2e0b9207926f8a34f3e7b49f;p=xonotic%2Fxonotic-data.pk3dir.git seeker: make accel/decel consistent with rocket launcher and ticrate independent --- diff --git a/balance25.cfg b/balance25.cfg index a5d3b68f1..d316ce823 100644 --- a/balance25.cfg +++ b/balance25.cfg @@ -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 diff --git a/balanceLeeStricklin.cfg b/balanceLeeStricklin.cfg index baca6f9f3..064b72c76 100644 --- a/balanceLeeStricklin.cfg +++ b/balanceLeeStricklin.cfg @@ -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 diff --git a/balanceSamual.cfg b/balanceSamual.cfg index 2935a2cca..c39a9c646 100644 --- a/balanceSamual.cfg +++ b/balanceSamual.cfg @@ -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 diff --git a/balanceXonotic.cfg b/balanceXonotic.cfg index 563318a68..1edf010f3 100644 --- a/balanceXonotic.cfg +++ b/balanceXonotic.cfg @@ -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 diff --git a/balancetZork.cfg b/balancetZork.cfg index 58b3e3c27..2da45b691 100644 --- a/balancetZork.cfg +++ b/balancetZork.cfg @@ -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 diff --git a/qcsrc/server/w_seeker.qc b/qcsrc/server/w_seeker.qc index 09c7ec85a..6ee8ff07d 100644 --- a/qcsrc/server/w_seeker.qc +++ b/qcsrc/server/w_seeker.qc @@ -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);