]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/w_seeker.qc
get rid of some cruft (mapvote_maxlen) that was for the old centerprint mapvote interface
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / w_seeker.qc
index 361c1e99687eaa60549b70856e339a474d700cbf..11423cdf9ca9f0fe098ac596fde5d253c76c7992 100644 (file)
@@ -1,66 +1,19 @@
 #ifdef REGISTER_WEAPON
-REGISTER_WEAPON(SEEKER, w_seeker, IT_ROCKETS, 8, WEP_FLAG_NORMAL | WEP_TYPE_SPLASH, BOT_PICKUP_RATING_MID, "seeker", "seeker", _("T.A.G. Seeker"))
+REGISTER_WEAPON(SEEKER, w_seeker, IT_ROCKETS, 8, WEP_FLAG_RELOADABLE | WEP_TYPE_SPLASH, BOT_PICKUP_RATING_MID, "seeker", "seeker", _("T.A.G. Seeker"))
 #else
 #ifdef SVQC
 //.float proxytime; = autoswitch
 //.float tl; = wait
+.entity tag_target, wps_tag_tracker;
+.float tag_time;
 
-void W_Seeker_SetAmmoCounter()
-{
-       // set clip_load to the weapon we have switched to, if the gun uses reloading
-       if(!autocvar_g_balance_seeker_reload_ammo)
-               self.clip_load = 0; // also keeps crosshair ammo from displaying
-       else
-       {
-               self.clip_load = self.seeker_load;
-               self.clip_size = autocvar_g_balance_seeker_reload_ammo; // for the crosshair ammo display
-       }
-}
-
-void W_Seeker_ReloadedAndReady()
-{
-       float t;
-
-       // now do the ammo transfer
-       self.clip_load = self.old_clip_load; // restore the ammo counter, in case we still had ammo in the weapon before reloading
-       while(self.clip_load < autocvar_g_balance_seeker_reload_ammo && self.ammo_rockets) // make sure we don't add more ammo than we have
-       {
-               self.clip_load += 1;
-               self.ammo_rockets -= 1;
-       }
-       self.seeker_load = self.clip_load;
-
-       t = ATTACK_FINISHED(self) - autocvar_g_balance_seeker_reload_time - 1;
-       ATTACK_FINISHED(self) = t;
-       w_ready();
-}
-
-void W_Seeker_Reload()
-{
-       // return if reloading is disabled for this weapon
-       if(!autocvar_g_balance_seeker_reload_ammo)
-               return;
-
-       if(!W_ReloadCheck(self.ammo_rockets, min(autocvar_g_balance_seeker_missile_ammo, autocvar_g_balance_seeker_tag_ammo)))
-               return;
-
-       float t;
-
-       sound (self, CHAN_WEAPON2, "weapons/reload.wav", VOL_BASE, ATTN_NORM);
-
-       t = max(time, ATTACK_FINISHED(self)) + autocvar_g_balance_seeker_reload_time + 1;
-       ATTACK_FINISHED(self) = t;
-
-       weapon_thinkf(WFRAME_RELOAD, autocvar_g_balance_seeker_reload_time, W_Seeker_ReloadedAndReady);
-
-       self.old_clip_load = self.clip_load;
-       self.clip_load = -1;
-}
-
+// ============================
+// Begin: Missile functions, these are general functions to be manipulated by other code
+// ============================
 void Seeker_Missile_Explode ()
 {
        self.event_damage = SUB_Null;
-       RadiusDamage (self, self.owner, autocvar_g_balance_seeker_missile_damage, autocvar_g_balance_seeker_missile_edgedamage, autocvar_g_balance_seeker_missile_radius, world, autocvar_g_balance_seeker_missile_force, self.projectiledeathtype, other);
+       RadiusDamage (self, self.realowner, autocvar_g_balance_seeker_missile_damage, autocvar_g_balance_seeker_missile_edgedamage, autocvar_g_balance_seeker_missile_radius, world, autocvar_g_balance_seeker_missile_force, self.projectiledeathtype, other);
 
        remove (self);
 }
@@ -172,7 +125,7 @@ void Seeker_Missile_Damage (entity inflictor, entity attacker, float damage, flo
        if (self.health <= 0)
                return;
 
-       if (self.owner == attacker)
+       if (self.realowner == attacker)
                self.health = self.health - (damage * 0.25);
        else
                self.health = self.health - damage;
@@ -206,31 +159,21 @@ void Seeker_Missile_Animate()
 }
 */
 
-void Seeker_Fire_Missile(vector f_diff)
+void Seeker_Fire_Missile(vector f_diff, entity m_target)
 {
        local entity missile;
 
-       // if this weapon is reloadable, decrease its load. Else decrease the player's ammo
-       if not(self.items & IT_UNLIMITED_WEAPON_AMMO)
-       {
-               if(autocvar_g_balance_seeker_reload_ammo)
-               {
-                       self.clip_load -= autocvar_g_balance_seeker_missile_ammo;
-                       self.seeker_load = self.clip_load;
-               }
-               else
-                       self.ammo_rockets -= autocvar_g_balance_seeker_missile_ammo;
-       }
+       W_DecreaseAmmo(ammo_rockets, autocvar_g_balance_seeker_missile_ammo, autocvar_g_balance_seeker_reload_ammo);
 
        makevectors(self.v_angle);
-       W_SetupShot_ProjectileSize (self, '-2 -2 -2', '2 2 2', FALSE, 2, "weapons/seeker_fire.wav", CHAN_WEAPON, 0);
+       W_SetupShot_ProjectileSize (self, '-2 -2 -2', '2 2 2', FALSE, 2, "weapons/seeker_fire.wav", CH_WEAPON_A, 0);
        w_shotorg += f_diff;
        pointparticles(particleeffectnum("seeker_muzzleflash"), w_shotorg, w_shotdir * 1000, 1);
 
        //self.detornator         = FALSE;
 
        missile                 = spawn();
-       missile.owner           = self;
+       missile.owner           = missile.realowner = self;
        missile.classname       = "seeker_missile";
        missile.bot_dodge       = TRUE;
        missile.bot_dodgerating = autocvar_g_balance_seeker_missile_damage;
@@ -240,14 +183,18 @@ void Seeker_Fire_Missile(vector f_diff)
        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;
        missile.health          = autocvar_g_balance_seeker_missile_health;
        missile.damageforcescale = autocvar_g_balance_seeker_missile_damageforcescale;
-       missile.projectiledeathtype = WEP_SEEKER;
        //missile.think           = Seeker_Missile_Animate; // csqc projectiles.
+       
+       if (missile.enemy != world)
+               missile.projectiledeathtype = WEP_SEEKER | HITTYPE_SECONDARY;
+       else 
+               missile.projectiledeathtype = WEP_SEEKER;
 
 
        setorigin (missile, w_shotorg);
@@ -263,41 +210,153 @@ void Seeker_Fire_Missile(vector f_diff)
        other = missile; MUTATOR_CALLHOOK(EditProjectile);
 }
 
-void Seeker_Vollycontroler_Think()
+// ============================
+// Begin: FLAC, close range attack meant for defeating rockets which are coming at you. 
+// ============================
+void Seeker_Flac_Explode ()
+{
+       self.event_damage = SUB_Null;
+
+       RadiusDamage (self, self.realowner, 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", CH_WEAPON_A, 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);
+}
+
+// ============================
+// Begin: Tag and rocket controllers 
+// ============================
+entity Seeker_Tagged_Info(entity isowner, entity istarget)
+{
+       entity tag;
+       for(tag = world; (tag = find(tag, classname, "tag_tracker")); ) 
+               if ((tag.realowner == isowner) && (tag.tag_target == istarget))
+                       return tag;
+               
+       return world;
+}
+
+void Seeker_Attack()
+{
+       entity tracker, closest_target;
+       
+       for(tracker = world; (tracker = find(tracker, classname, "tag_tracker")); ) if (tracker.realowner == 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);
+}
+
+void Seeker_Vollycontroller_Think() // TODO: Merge this with Seeker_Attack
 {
        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))
+       if((!(self.realowner.items & IT_UNLIMITED_AMMO) && self.realowner.ammo_rockets < autocvar_g_balance_seeker_missile_ammo) || (self.cnt <= -1) || (self.realowner.deadflag != DEAD_NO) || (self.realowner.switchweapon != WEP_SEEKER))
        {
                remove(self);
                return;
        }
 
        self.nextthink = time + autocvar_g_balance_seeker_missile_delay;
-
+       
        oldself = self;
-       self = self.owner;
-
+       self = self.realowner;
+       
        oldenemy = self.enemy;
        self.enemy = oldself.enemy;
-
-       c = mod(oldself.cnt, 4);
+       
+       c = mod(self.cnt, 4);
        switch(c)
        {
                case 0:
-                       Seeker_Fire_Missile('-1.25 -3.75 0');
+                       Seeker_Fire_Missile('-1.25 -3.75 0', self.enemy);
                        break;
                case 1:
-                       Seeker_Fire_Missile('+1.25 -3.75 0');
+                       Seeker_Fire_Missile('+1.25 -3.75 0', self.enemy);
                        break;
                case 2:
-                       Seeker_Fire_Missile('-1.25 +3.75 0');
+                       Seeker_Fire_Missile('-1.25 +3.75 0', self.enemy);
                        break;
                case 3:
                default:
-                       Seeker_Fire_Missile('+1.25 +3.75 0');
+                       Seeker_Fire_Missile('+1.25 +3.75 0', self.enemy);
                        break;
        }
 
@@ -305,9 +364,30 @@ void Seeker_Vollycontroler_Think()
        self = oldself;
 }
 
+void Seeker_Tracker_Think() 
+{
+       // commit suicide if: You die OR target dies OR you switch away from the seeker OR commit suicide if lifetime is up
+       if ((self.realowner.deadflag != DEAD_NO) || (self.tag_target.deadflag != DEAD_NO) || (self.realowner.switchweapon != WEP_SEEKER)
+       || (time > self.tag_time + autocvar_g_balance_seeker_tag_tracker_lifetime))
+       {
+               if (self)
+               {
+                       WaypointSprite_Kill(self.tag_target.wps_tag_tracker);
+                       remove(self);
+               }
+               return;
+       }
+       
+       // Update the think method information
+       self.nextthink = time;
+}
+
+// ============================
+// Begin: Tag projectile 
+// ============================
 void Seeker_Tag_Explode ()
 {
-       //if(other==self.owner)
+       //if(other==self.realowner)
        //    return;
        Damage_DamageInfo(self.origin, 0, 0, 0, self.velocity, WEP_SEEKER | HITTYPE_BOUNCE, self);
 
@@ -323,14 +403,13 @@ void Seeker_Tag_Damage (entity inflictor, entity attacker, float damage, float d
                Seeker_Tag_Explode();
 }
 
-
 void Seeker_Tag_Touch()
 {
        vector dir;
        vector org2;
        entity e;
        
-       dir     = normalize (self.owner.origin - self.origin);
+       dir     = normalize (self.realowner.origin - self.origin);
        org2    = findbetterlocation (self.origin, 8);
 
        te_knightspike(org2);
@@ -339,13 +418,46 @@ void Seeker_Tag_Touch()
        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.realowner, other);
+               
+               if (tag != world)
+               {
+                       if (other.wps_tag_tracker && (autocvar_g_balance_seeker_type == 1)) // don't attach another waypointsprite without killing the old one first
+                               WaypointSprite_Kill(other.wps_tag_tracker);
+                               
+                       tag.tag_time = time;
+               }
+               else
+               {               
+                       //sprint(self.realowner, strcat("You just tagged ^2", other.netname, "^7 with a tracking device!\n"));
+                       e             = spawn();
+                       e.cnt         = autocvar_g_balance_seeker_missile_count;
+                       e.classname   = "tag_tracker";
+                       e.owner       = self.owner;
+                       e.realowner   = self.realowner;
+                       
+                       if      (autocvar_g_balance_seeker_type == 1)
+                       {
+                               e.tag_target  = other;
+                               e.tag_time    = time;
+                               e.think       = Seeker_Tracker_Think;
+                       }
+                       else 
+                       {
+                               e.enemy     = other;
+                               e.think     = Seeker_Vollycontroller_Think;
+                       }
+                       
+                       e.nextthink   = time;
+               }
+               
+               if      (autocvar_g_balance_seeker_type == 1)
+               {
+                       WaypointSprite_Spawn("tagged-target", autocvar_g_balance_seeker_tag_tracker_lifetime, 0, other, '0 0 64', self.realowner, 0, other, wps_tag_tracker, TRUE, RADARICON_TAGGED, '0.5 1 0');
+                       WaypointSprite_UpdateRule(other.wps_tag_tracker, 0, SPRITERULE_DEFAULT);
+               }
        }
 
        remove(self);
@@ -355,22 +467,12 @@ void Seeker_Tag_Touch()
 void Seeker_Fire_Tag()
 {
        local entity missile;
-       // if this weapon is reloadable, decrease its load. Else decrease the player's ammo
-       if not(self.items & IT_UNLIMITED_WEAPON_AMMO)
-       {
-               if(autocvar_g_balance_seeker_reload_ammo)
-               {
-                       self.clip_load -= autocvar_g_balance_seeker_tag_ammo;
-                       self.seeker_load = self.clip_load;
-               }
-               else
-                       self.ammo_rockets -= autocvar_g_balance_seeker_tag_ammo;
-       }
+       W_DecreaseAmmo(ammo_rockets, autocvar_g_balance_seeker_tag_ammo, autocvar_g_balance_seeker_reload_ammo);
 
-       W_SetupShot_ProjectileSize (self, '-2 -2 -2', '2 2 2', FALSE, 2, "weapons/tag_fire.wav", CHAN_WEAPON, autocvar_g_balance_seeker_missile_damage * autocvar_g_balance_seeker_missile_count);
+       W_SetupShot_ProjectileSize (self, '-2 -2 -2', '2 2 2', FALSE, 2, "weapons/tag_fire.wav", CH_WEAPON_A, autocvar_g_balance_seeker_missile_damage * autocvar_g_balance_seeker_missile_count);
 
        missile                 = spawn();
-       missile.owner           = self;
+       missile.owner           = missile.realowner = self;
        missile.classname       = "seeker_tag";
        missile.bot_dodge       = TRUE;
        missile.bot_dodgerating = 50;
@@ -379,7 +481,6 @@ void Seeker_Fire_Tag()
        missile.nextthink       = time + autocvar_g_balance_seeker_tag_lifetime;
        missile.movetype        = MOVETYPE_FLY;
        missile.solid           = SOLID_BBOX;
-       missile.owner           = self;
 
        missile.takedamage       = DAMAGE_YES;
        missile.event_damage    = Seeker_Tag_Explode;
@@ -400,91 +501,9 @@ void Seeker_Fire_Tag()
        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;
-
-       // if this weapon is reloadable, decrease its load. Else decrease the player's ammo
-       if not(self.items & IT_UNLIMITED_WEAPON_AMMO)
-       {
-               if(autocvar_g_balance_seeker_reload_ammo)
-               {
-                       self.clip_load -= autocvar_g_balance_seeker_flac_ammo;
-                       self.seeker_load = self.clip_load;
-               }
-               else
-                       self.ammo_rockets -= autocvar_g_balance_seeker_flac_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);
-}
-
+// ============================
+// Begin: Genereal weapon functions
+// ============================
 void spawnfunc_weapon_seeker (void)
 {
        weapon_defaultspawnfunc(WEP_SEEKER);
@@ -495,28 +514,57 @@ float w_seeker(float req)
        float ammo_amount;
 
        if (req == WR_AIM)
-               self.BUTTON_ATCK = bot_aim(autocvar_g_balance_seeker_tag_speed, 0, 20, FALSE);
-
+       {
+               if (autocvar_g_balance_seeker_type == 1) 
+                       if (Seeker_Tagged_Info(self, self.enemy) != world)
+                               self.BUTTON_ATCK = bot_aim(autocvar_g_balance_seeker_missile_speed_max, 0, autocvar_g_balance_seeker_missile_lifetime, FALSE);
+                       else
+                               self.BUTTON_ATCK2 = bot_aim(autocvar_g_balance_seeker_tag_speed, 0, autocvar_g_balance_seeker_tag_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
-                       W_Seeker_Reload();
-
+                       weapon_action(self.weapon, WR_RELOAD);
+                       
                else if (self.BUTTON_ATCK)
                {
-                       if (weapon_prepareattack(0, autocvar_g_balance_seeker_tag_refire))
+                       if (autocvar_g_balance_seeker_type == 1) 
+                       {
+                               if (weapon_prepareattack(0, autocvar_g_balance_seeker_missile_refire))
+                               {
+                                       Seeker_Attack();
+                                       weapon_thinkf(WFRAME_FIRE2, autocvar_g_balance_seeker_missile_animtime, w_ready);
+                               }
+                       }
+                       else 
                        {
-                               Seeker_Fire_Tag();
-                               weapon_thinkf(WFRAME_FIRE1, autocvar_g_balance_seeker_tag_animtime, w_ready);
+                               if (weapon_prepareattack(0, autocvar_g_balance_seeker_tag_refire))
+                               {
+                                       Seeker_Fire_Tag();
+                                       weapon_thinkf(WFRAME_FIRE2, autocvar_g_balance_seeker_tag_animtime, w_ready);
+                               }
                        }
                }
 
                else if (self.BUTTON_ATCK2)
                {
-                       if (weapon_prepareattack(1, autocvar_g_balance_seeker_flac_refire))
+                       if (autocvar_g_balance_seeker_type == 1) 
+                       {
+                               if (weapon_prepareattack(0, autocvar_g_balance_seeker_tag_refire))
+                               {
+                                       Seeker_Fire_Tag();
+                                       weapon_thinkf(WFRAME_FIRE2, autocvar_g_balance_seeker_tag_animtime, w_ready);
+                               }
+                       }
+                       else 
                        {
-                               Seeker_Fire_Flac();
-                               weapon_thinkf(WFRAME_FIRE2, autocvar_g_balance_seeker_flac_animtime, w_ready);
+                               if (weapon_prepareattack(0, autocvar_g_balance_seeker_flac_refire))
+                               {
+                                       Seeker_Fire_Flac();
+                                       weapon_thinkf(WFRAME_FIRE2, autocvar_g_balance_seeker_flac_animtime, w_ready);
+                               }
                        }
                }
        }
@@ -528,28 +576,28 @@ float w_seeker(float req)
                precache_sound ("weapons/tag_fire.wav");
                precache_sound ("weapons/flac_fire.wav");
                precache_sound ("weapons/seeker_fire.wav");
-               precache_sound ("weapons/reload.wav");
+               //precache_sound ("weapons/reload.wav"); // until weapons have individual reload sounds, precache the reload sound somewhere else
        }
        else if (req == WR_SETUP)
        {
                weapon_setup(WEP_SEEKER);
-               W_Seeker_SetAmmoCounter();
+               self.current_ammo = ammo_rockets;
        }
        else if (req == WR_CHECKAMMO1)
        {
-               ammo_amount = self.ammo_cells >= autocvar_g_balance_seeker_missile_ammo;
-               ammo_amount += (autocvar_g_balance_seeker_reload_ammo && self.seeker_load >= autocvar_g_balance_seeker_missile_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_CHECKAMMO2)
        {
-               ammo_amount = self.ammo_cells >= autocvar_g_balance_seeker_flac_ammo;
-               ammo_amount += (autocvar_g_balance_seeker_reload_ammo && self.seeker_load >= autocvar_g_balance_seeker_flac_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_RELOAD)
        {
-               W_Seeker_Reload();
+               W_Reload(min(autocvar_g_balance_seeker_missile_ammo, autocvar_g_balance_seeker_tag_ammo), autocvar_g_balance_seeker_reload_ammo, autocvar_g_balance_seeker_reload_time, "weapons/reload.wav");
        }
        return TRUE;
 };
@@ -561,59 +609,40 @@ float w_seeker(float req)
        {
                vector org2;
                org2 = w_org + w_backoff * 6;
-               if(w_deathtype & HITTYPE_SECONDARY)
+               if(w_deathtype & HITTYPE_BOUNCE)
                {
-                       pointparticles(particleeffectnum("flac_explode"), org2, '0 0 0', 1);
+                       pointparticles(particleeffectnum("hagar_explode"), org2, '0 0 0', 1);
                        if(!w_issilent)
                        {
                                if (w_random<0.15)
-                                       sound(self, CHAN_PROJECTILE, "weapons/flacexp1.wav", 1, ATTN_NORM);
+                                       sound(self, CH_SHOTS, "weapons/tagexp1.wav", 1, ATTN_NORM);
                                else if (w_random<0.7)
-                                       sound(self, CHAN_PROJECTILE, "weapons/flacexp2.wav", 1, ATTN_NORM);
+                                       sound(self, CH_SHOTS, "weapons/tagexp2.wav", 1, ATTN_NORM);
                                else
-                                       sound(self, CHAN_PROJECTILE, "weapons/flacexp3.wav", 1, ATTN_NORM);
+                                       sound(self, CH_SHOTS, "weapons/tagexp3.wav", 1, ATTN_NORM);
                        }
                }
+               else if(w_deathtype & HITTYPE_HEADSHOT)
+               {
+                       if(!w_issilent)
+                               sound(self, CH_SHOTS, "weapons/tag_impact.wav", 1, ATTN_NORM);
+               }
                else
                {
-                       if(w_deathtype & HITTYPE_BOUNCE)
-                       {
-                               pointparticles(particleeffectnum("hagar_explode"), org2, '0 0 0', 1);
-                               if(!w_issilent)
-                               {
-                                       if (w_random<0.15)
-                                               sound(self, CHAN_PROJECTILE, "weapons/tagexp1.wav", 1, ATTN_NORM);
-                                       else if (w_random<0.7)
-                                               sound(self, CHAN_PROJECTILE, "weapons/tagexp2.wav", 1, ATTN_NORM);
-                                       else
-                                               sound(self, CHAN_PROJECTILE, "weapons/tagexp3.wav", 1, ATTN_NORM);
-                               }
-                       }
-                       else if(w_deathtype & HITTYPE_HEADSHOT)
-                       {
-                               if(!w_issilent)
-                                       sound(self, CHAN_PROJECTILE, "weapons/tag_impact.wav", 1, ATTN_NORM);
-                       }
-                       else
+                       pointparticles(particleeffectnum("hagar_explode"), org2, '0 0 0', 1);
+                       if(!w_issilent)
                        {
-                               pointparticles(particleeffectnum("hagar_explode"), org2, '0 0 0', 1);
-                               if(!w_issilent)
-                               {
-                                       if (w_random<0.15)
-                                               sound(self, CHAN_PROJECTILE, "weapons/seekerexp1.wav", 1, ATTN_NORM);
-                                       else if (w_random<0.7)
-                                               sound(self, CHAN_PROJECTILE, "weapons/seekerexp2.wav", 1, ATTN_NORM);
-                                       else
-                                               sound(self, CHAN_PROJECTILE, "weapons/seekerexp3.wav", 1, ATTN_NORM);
-                               }
+                               if (w_random<0.15)
+                                       sound(self, CH_SHOTS, "weapons/seekerexp1.wav", 1, ATTN_NORM);
+                               else if (w_random<0.7)
+                                       sound(self, CH_SHOTS, "weapons/seekerexp2.wav", 1, ATTN_NORM);
+                               else
+                                       sound(self, CH_SHOTS, "weapons/seekerexp3.wav", 1, ATTN_NORM);
                        }
                }
        }
        else if(req == WR_PRECACHE)
        {
-               precache_sound("weapons/flacexp1.wav");
-               precache_sound("weapons/flacexp2.wav");
-               precache_sound("weapons/flacexp3.wav");
                precache_sound("weapons/seekerexp1.wav");
                precache_sound("weapons/seekerexp2.wav");
                precache_sound("weapons/seekerexp3.wav");
@@ -623,13 +652,13 @@ float w_seeker(float req)
                precache_sound("weapons/tag_impact.wav");
        }
        else if (req == WR_SUICIDEMESSAGE)
-               w_deathtypestring = "%s played with tiny rockets";
+               w_deathtypestring = _("%s played with tiny rockets");
        else if (req == WR_KILLMESSAGE)
        {
                if(w_deathtype & HITTYPE_SECONDARY)
-                       w_deathtypestring = "%s ran into %s's flac";
+                       w_deathtypestring = _("%s was tagged by %s");
                else
-                       w_deathtypestring = "%s was tagged by %s";
+                       w_deathtypestring = _("%s was pummeled by %s");
        }
        return TRUE;
 }