set g_balance_fireball_reload_time 2
// }}}
// {{{ seeker
-set g_balance_seeker_flac_ammo 0.5
-set g_balance_seeker_flac_animtime 0.1
-set g_balance_seeker_flac_damage 15
-set g_balance_seeker_flac_edgedamage 10
-set g_balance_seeker_flac_force 50
-set g_balance_seeker_flac_lifetime 0.1
-set g_balance_seeker_flac_lifetime_rand 0.05
-set g_balance_seeker_flac_radius 100
-set g_balance_seeker_flac_refire 0.1
-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 1400
+set g_balance_seeker_tag_ammo 1
+set g_balance_seeker_tag_animtime 0.2
+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.75 // LOG: 0.7 -> 0.75
+set g_balance_seeker_tag_speed 5000
+set g_balance_seeker_tag_spread 0
+set g_balance_seeker_tag_tracker_lifetime 10
+set g_balance_seeker_missile_accel 1500
set g_balance_seeker_missile_ammo 2
set g_balance_seeker_missile_animtime 0.2
set g_balance_seeker_missile_count 3 // LOG: 8 -> 3
-set g_balance_seeker_missile_damage 30 // LOG: 15 -> 30
+set g_balance_seeker_missile_damage 16 // LOG: 15 -> 30
set g_balance_seeker_missile_damageforcescale 4
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 150 // LOG: 100 -> 150
+set g_balance_seeker_missile_edgedamage 8
+set g_balance_seeker_missile_force 50 // LOG: 100 -> 150
set g_balance_seeker_missile_health 5
set g_balance_seeker_missile_lifetime 15
set g_balance_seeker_missile_proxy 0
set g_balance_seeker_missile_proxy_delay 0.2
set g_balance_seeker_missile_proxy_maxrange 45
-set g_balance_seeker_missile_radius 80
-set g_balance_seeker_missile_refire 0.5
-set g_balance_seeker_missile_smart 1
+set g_balance_seeker_missile_radius 70
+set g_balance_seeker_missile_refire 0.2
+set g_balance_seeker_missile_smart 0
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_up 300
+set g_balance_seeker_missile_speed 1500
+set g_balance_seeker_missile_speed_up 0
set g_balance_seeker_missile_speed_z 0
-set g_balance_seeker_missile_speed_max 1300 // LOG: 1400 -> 1300
+set g_balance_seeker_missile_speed_max 2000 // LOG: 1400 -> 1300
set g_balance_seeker_missile_spread 0
-set g_balance_seeker_missile_turnrate 0.65
-set g_balance_seeker_tag_ammo 1
-set g_balance_seeker_tag_animtime 0.2
-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.75 // LOG: 0.7 -> 0.75
-set g_balance_seeker_tag_speed 5000
-set g_balance_seeker_tag_spread 0
+set g_balance_seeker_missile_turnrate 0.25
set g_balance_seeker_reload_ammo 0 //default: 15
set g_balance_seeker_reload_time 2
// End new seeker
float autocvar_g_balance_rune_vampire_absorb;
float autocvar_g_balance_rune_vampire_combo_absorb;
float autocvar_g_balance_rune_vampire_maxhealth;
-float autocvar_g_balance_seeker_flac_ammo;
-float autocvar_g_balance_seeker_flac_animtime;
-float autocvar_g_balance_seeker_flac_damage;
-float autocvar_g_balance_seeker_flac_edgedamage;
-float autocvar_g_balance_seeker_flac_force;
-float autocvar_g_balance_seeker_flac_lifetime;
-float autocvar_g_balance_seeker_flac_lifetime_rand;
-float autocvar_g_balance_seeker_flac_radius;
-float autocvar_g_balance_seeker_flac_refire;
float autocvar_g_balance_seeker_missile_accel;
float autocvar_g_balance_seeker_missile_ammo;
+float autocvar_g_balance_seeker_missile_animtime;
float autocvar_g_balance_seeker_missile_count;
float autocvar_g_balance_seeker_missile_damage;
float autocvar_g_balance_seeker_missile_damageforcescale;
float autocvar_g_balance_seeker_missile_proxy_delay;
float autocvar_g_balance_seeker_missile_proxy_maxrange;
float autocvar_g_balance_seeker_missile_radius;
+float autocvar_g_balance_seeker_missile_refire;
float autocvar_g_balance_seeker_missile_smart;
float autocvar_g_balance_seeker_missile_smart_mindist;
float autocvar_g_balance_seeker_missile_smart_trace_max;
float autocvar_g_balance_seeker_tag_lifetime;
float autocvar_g_balance_seeker_tag_refire;
float autocvar_g_balance_seeker_tag_speed;
+float autocvar_g_balance_seeker_tag_tracker_lifetime;
float autocvar_g_balance_seeker_reload_ammo;
float autocvar_g_balance_seeker_reload_time;
float autocvar_g_balance_selfdamagepercent;
#ifdef SVQC
//.float proxytime; = autoswitch
//.float tl; = wait
+.entity tag_target;
+.float tag_time;
void Seeker_Missile_Explode ()
{
}
*/
-void Seeker_Fire_Missile(vector f_diff)
+void Seeker_Fire_Missile(vector f_diff, entity m_target)
{
local entity missile;
missile.event_damage = Seeker_Missile_Damage;
missile.nextthink = time;// + 0.2;// + cvar("g_balance_seeker_missile_activate_delay");
missile.cnt = time + autocvar_g_balance_seeker_missile_lifetime;
- missile.enemy = self.enemy;
+ missile.enemy = m_target;
missile.solid = SOLID_BBOX;
missile.scale = 2;
missile.takedamage = DAMAGE_YES;
other = missile; MUTATOR_CALLHOOK(EditProjectile);
}
-void Seeker_Vollycontroler_Think()
+entity Seeker_Tagged_Info(entity isowner, entity istarget)
{
- float c;
- entity oldself,oldenemy;
- self.cnt = self.cnt - 1;
-
- if((!(self.owner.items & IT_UNLIMITED_AMMO) && self.owner.ammo_rockets < autocvar_g_balance_seeker_missile_ammo) || (self.cnt <= -1) || (self.owner.deadflag != DEAD_NO) || (self.owner.switchweapon != WEP_SEEKER))
- {
- remove(self);
- return;
- }
-
- self.nextthink = time + autocvar_g_balance_seeker_missile_delay;
+ entity tag;
+ for(tag = world; (tag = find(tag, classname, "tag_tracker")); )
+ if ((tag.owner == isowner) && (tag.tag_target == istarget))
+ return tag;
+
+ return world;
+}
- oldself = self;
- self = self.owner;
+void Seeker_Attack()
+{
+ entity tracker, closest_target;
+ for(tracker = world; (tracker = find(tracker, classname, "tag_tracker")); )
+ if (tracker.owner == self)
+ if (closest_target)
+ {
+ if (vlen(self.origin - tracker.tag_target.origin) < vlen(self.origin - closest_target.origin))
+ closest_target = tracker.tag_target;
+ }
+ else
+ closest_target = tracker.tag_target;
+
+ traceline(self.origin + self.view_ofs, closest_target.origin, MOVE_NOMONSTERS, self);
+ if ((!closest_target) || (trace_fraction < 1 && trace_ent != closest_target))
+ closest_target = world;
+
+ Seeker_Fire_Missile('0 0 0', closest_target);
- oldenemy = self.enemy;
- self.enemy = oldself.enemy;
+}
- c = mod(oldself.cnt, 4);
- switch(c)
+void Seeker_Tracker_Think() // this think method keeps track of the tag entity created to follow/tag down a player.
+{
+ // Update the think method information
+ self.nextthink = time;
+
+ // commit suicide if: You die OR target dies OR you switch away from the seeker OR commit suicide if lifetime is up
+ if ((self.owner.deadflag != DEAD_NO) || (self.tag_target.deadflag != DEAD_NO) || (self.owner.switchweapon != WEP_SEEKER)
+ || (time > self.tag_time + autocvar_g_balance_seeker_tag_lifetime))
{
- case 0:
- Seeker_Fire_Missile('-1.25 -3.75 0');
- break;
- case 1:
- Seeker_Fire_Missile('+1.25 -3.75 0');
- break;
- case 2:
- Seeker_Fire_Missile('-1.25 +3.75 0');
- break;
- case 3:
- default:
- Seeker_Fire_Missile('+1.25 +3.75 0');
- break;
+ if (self)
+ {
+ WaypointSprite_Kill(self.tag_target.waypointsprite_attachedforcarrier);
+ remove(self);
+ }
+ return;
}
-
- self.enemy = oldenemy;
- self = oldself;
}
void Seeker_Tag_Explode ()
Seeker_Tag_Explode();
}
-
void Seeker_Tag_Touch()
{
vector dir;
Damage_DamageInfo(self.origin, 0, 0, 0, self.velocity, WEP_SEEKER | HITTYPE_HEADSHOT, self);
if (other.takedamage == DAMAGE_AIM && other.deadflag == DEAD_NO)
- {
- e = spawn();
- e.cnt = autocvar_g_balance_seeker_missile_count;
- e.owner = self.owner;
- e.enemy = other;
- e.think = Seeker_Vollycontroler_Think;
- e.nextthink = time;
+ {
+ // check to see if this person is already tagged by me
+ entity tag = Seeker_Tagged_Info(self.owner, other);
+
+ if (tag != world) // if so, just update the time at which the player was last tagged.
+ tag.tag_time = time;
+ else // if not, create a new tracker just for this person.
+ {
+ e = spawn();
+ e.classname = "tag_tracker";
+ e.owner = self.owner;
+ e.think = Seeker_Tracker_Think;
+ e.nextthink = time;
+ e.tag_target = other;
+ e.tag_time = time;
+
+ WaypointSprite_Spawn("ka-ball", autocvar_g_balance_seeker_tag_tracker_lifetime, 0, other, '0 0 64', self.owner, 0, other, waypointsprite_attachedforcarrier, TRUE);
+ WaypointSprite_UpdateRule(other.waypointsprite_attachedforcarrier, 0, SPRITERULE_DEFAULT);
+
+ print("hit: ", self.owner.netname, " -> ", other.netname, ". \n");
+ }
}
remove(self);
other = missile; MUTATOR_CALLHOOK(EditProjectile);
}
-
-void Seeker_Flac_Explode ()
-{
- self.event_damage = SUB_Null;
-
- RadiusDamage (self, self.owner, autocvar_g_balance_seeker_flac_damage, autocvar_g_balance_seeker_flac_edgedamage, autocvar_g_balance_seeker_flac_radius, world, autocvar_g_balance_seeker_flac_force, self.projectiledeathtype, other);
-
- remove (self);
-}
-
-void Seeker_Flac_Touch()
-{
- PROJECTILE_TOUCH;
-
- Seeker_Flac_Explode();
-}
-
-void Seeker_Fire_Flac()
-{
- local entity missile;
- vector f_diff;
- float c;
-
- W_DecreaseAmmo(ammo_rockets, autocvar_g_balance_seeker_flac_ammo, autocvar_g_balance_seeker_reload_ammo);
-
- c = mod(self.bulletcounter, 4);
- switch(c)
- {
- case 0:
- f_diff = '-1.25 -3.75 0';
- break;
- case 1:
- f_diff = '+1.25 -3.75 0';
- break;
- case 2:
- f_diff = '-1.25 +3.75 0';
- break;
- case 3:
- default:
- f_diff = '+1.25 +3.75 0';
- break;
- }
- W_SetupShot_ProjectileSize (self, '-2 -2 -2', '2 2 2', FALSE, 2, "weapons/flac_fire.wav", CHAN_WEAPON, autocvar_g_balance_seeker_flac_damage);
- w_shotorg += f_diff;
-
- pointparticles(particleeffectnum("hagar_muzzleflash"), w_shotorg, w_shotdir * 1000, 1);
-
- missile = spawn ();
- missile.owner = missile.realowner = self;
- missile.classname = "missile";
- missile.bot_dodge = TRUE;
- missile.bot_dodgerating = autocvar_g_balance_seeker_flac_damage;
- missile.touch = Seeker_Flac_Explode;
- missile.use = Seeker_Flac_Explode;
- missile.think = adaptor_think2use_hittype_splash;
- missile.nextthink = time + autocvar_g_balance_seeker_flac_lifetime + autocvar_g_balance_seeker_flac_lifetime_rand;
- missile.solid = SOLID_BBOX;
- missile.movetype = MOVETYPE_FLY;
- missile.projectiledeathtype = WEP_SEEKER;
- missile.projectiledeathtype = WEP_SEEKER | HITTYPE_SECONDARY;
- missile.flags = FL_PROJECTILE;
-
- // csqc projectiles
- //missile.angles = vectoangles (missile.velocity);
- //missile.scale = 0.4; // BUG: the model is too big
-
- setorigin (missile, w_shotorg);
- setsize (missile, '-2 -2 -2', '2 2 2');
-
- W_SETUPPROJECTILEVELOCITY_UP(missile, g_balance_seeker_flac);
- CSQCProjectile(missile, TRUE, PROJECTILE_FLAC, TRUE);
-
- other = missile; MUTATOR_CALLHOOK(EditProjectile);
-}
-
void spawnfunc_weapon_seeker (void)
{
weapon_defaultspawnfunc(WEP_SEEKER);
float ammo_amount;
if (req == WR_AIM)
- self.BUTTON_ATCK = bot_aim(autocvar_g_balance_seeker_tag_speed, 0, 20, FALSE);
-
+ {
+ if (Seeker_Tagged_Info(self, self.enemy) != world)
+ self.BUTTON_ATCK2 = bot_aim(autocvar_g_balance_seeker_missile_speed_max, 0, autocvar_g_balance_seeker_missile_lifetime, FALSE);
+ else
+ self.BUTTON_ATCK = bot_aim(autocvar_g_balance_seeker_tag_speed, 0, autocvar_g_balance_seeker_tag_lifetime, FALSE);
+ }
else if (req == WR_THINK)
{
if(autocvar_g_balance_seeker_reload_ammo && self.clip_load < min(autocvar_g_balance_seeker_missile_ammo, autocvar_g_balance_seeker_tag_ammo)) // forced reload
weapon_action(self.weapon, WR_RELOAD);
-
+
else if (self.BUTTON_ATCK)
{
if (weapon_prepareattack(0, autocvar_g_balance_seeker_tag_refire))
else if (self.BUTTON_ATCK2)
{
- if (weapon_prepareattack(1, autocvar_g_balance_seeker_flac_refire))
+ if (weapon_prepareattack(1, autocvar_g_balance_seeker_missile_refire))
{
- Seeker_Fire_Flac();
- weapon_thinkf(WFRAME_FIRE2, autocvar_g_balance_seeker_flac_animtime, w_ready);
+ Seeker_Attack();
+ weapon_thinkf(WFRAME_FIRE2, autocvar_g_balance_seeker_missile_animtime, w_ready);
}
}
}
}
else if (req == WR_CHECKAMMO1)
{
- ammo_amount = self.ammo_cells >= autocvar_g_balance_seeker_missile_ammo;
- ammo_amount += self.weapon_load[WEP_SEEKER] >= autocvar_g_balance_seeker_missile_ammo;
+ ammo_amount = self.ammo_rockets >= autocvar_g_balance_seeker_tag_ammo;
+ ammo_amount += self.weapon_load[WEP_SEEKER] >= autocvar_g_balance_seeker_tag_ammo;
return ammo_amount;
}
else if (req == WR_CHECKAMMO2)
{
- ammo_amount = self.ammo_cells >= autocvar_g_balance_seeker_flac_ammo;
- ammo_amount += self.weapon_load[WEP_SEEKER] >= autocvar_g_balance_seeker_flac_ammo;
+ ammo_amount = self.ammo_rockets >= autocvar_g_balance_seeker_missile_ammo;
+ ammo_amount += self.weapon_load[WEP_SEEKER] >= autocvar_g_balance_seeker_missile_ammo;
return ammo_amount;
}
else if (req == WR_RELOAD)