3 /* ammotype */ ATTRIB(Seeker, ammo_field, .int, ammo_rockets)
4 /* impulse */ ATTRIB(Seeker, impulse, int, 8)
5 /* flags */ ATTRIB(Seeker, spawnflags, int, WEP_FLAG_MUTATORBLOCKED | WEP_FLAG_RELOADABLE | WEP_TYPE_SPLASH);
6 /* rating */ ATTRIB(Seeker, bot_pickupbasevalue, float, BOT_PICKUP_RATING_HIGH);
7 /* color */ ATTRIB(Seeker, wpcolor, vector, '0.5 1 0');
8 /* modelname */ ATTRIB(Seeker, mdl, string, "seeker");
10 /* model */ ATTRIB(Seeker, m_model, Model, MDL_SEEKER_ITEM);
12 /* crosshair */ ATTRIB(Seeker, w_crosshair, string, "gfx/crosshairseeker");
13 /* crosshair */ ATTRIB(Seeker, w_crosshair_size, float, 0.8);
14 /* wepimg */ ATTRIB(Seeker, model2, string, "weaponseeker");
15 /* refname */ ATTRIB(Seeker, netname, string, "seeker");
16 /* wepname */ ATTRIB(Seeker, m_name, string, _("T.A.G. Seeker"));
18 #define X(BEGIN, P, END, class, prefix) \
20 P(class, prefix, flac_ammo, float, NONE) \
21 P(class, prefix, flac_animtime, float, NONE) \
22 P(class, prefix, flac_damage, float, NONE) \
23 P(class, prefix, flac_edgedamage, float, NONE) \
24 P(class, prefix, flac_force, float, NONE) \
25 P(class, prefix, flac_lifetime, float, NONE) \
26 P(class, prefix, flac_lifetime_rand, float, NONE) \
27 P(class, prefix, flac_radius, float, NONE) \
28 P(class, prefix, flac_refire, float, NONE) \
29 P(class, prefix, flac_speed, float, NONE) \
30 P(class, prefix, flac_speed_up, float, NONE) \
31 P(class, prefix, flac_speed_z, float, NONE) \
32 P(class, prefix, flac_spread, float, NONE) \
33 P(class, prefix, missile_accel, float, NONE) \
34 P(class, prefix, missile_ammo, float, NONE) \
35 P(class, prefix, missile_animtime, float, NONE) \
36 P(class, prefix, missile_count, float, NONE) \
37 P(class, prefix, missile_damageforcescale, float, NONE) \
38 P(class, prefix, missile_damage, float, NONE) \
39 P(class, prefix, missile_decel, float, NONE) \
40 P(class, prefix, missile_delay, float, NONE) \
41 P(class, prefix, missile_edgedamage, float, NONE) \
42 P(class, prefix, missile_force, float, NONE) \
43 P(class, prefix, missile_health, float, NONE) \
44 P(class, prefix, missile_lifetime, float, NONE) \
45 P(class, prefix, missile_proxy, float, NONE) \
46 P(class, prefix, missile_proxy_delay, float, NONE) \
47 P(class, prefix, missile_proxy_maxrange, float, NONE) \
48 P(class, prefix, missile_radius, float, NONE) \
49 P(class, prefix, missile_refire, float, NONE) \
50 P(class, prefix, missile_smart, float, NONE) \
51 P(class, prefix, missile_smart_mindist, float, NONE) \
52 P(class, prefix, missile_smart_trace_max, float, NONE) \
53 P(class, prefix, missile_smart_trace_min, float, NONE) \
54 P(class, prefix, missile_speed, float, NONE) \
55 P(class, prefix, missile_speed_max, float, NONE) \
56 P(class, prefix, missile_speed_up, float, NONE) \
57 P(class, prefix, missile_speed_z, float, NONE) \
58 P(class, prefix, missile_spread, float, NONE) \
59 P(class, prefix, missile_turnrate, float, NONE) \
60 P(class, prefix, reload_ammo, float, NONE) \
61 P(class, prefix, reload_time, float, NONE) \
62 P(class, prefix, switchdelay_drop, float, NONE) \
63 P(class, prefix, switchdelay_raise, float, NONE) \
64 P(class, prefix, tag_ammo, float, NONE) \
65 P(class, prefix, tag_animtime, float, NONE) \
66 P(class, prefix, tag_damageforcescale, float, NONE) \
67 P(class, prefix, tag_health, float, NONE) \
68 P(class, prefix, tag_lifetime, float, NONE) \
69 P(class, prefix, tag_refire, float, NONE) \
70 P(class, prefix, tag_speed, float, NONE) \
71 P(class, prefix, tag_spread, float, NONE) \
72 P(class, prefix, tag_tracker_lifetime, float, NONE) \
73 P(class, prefix, type, float, NONE) \
74 P(class, prefix, weaponreplace, string, NONE) \
75 P(class, prefix, weaponstartoverride, float, NONE) \
76 P(class, prefix, weaponstart, float, NONE) \
77 P(class, prefix, weaponthrowable, float, NONE) \
79 W_PROPS(X, Seeker, seeker)
82 REGISTER_WEAPON(SEEKER, seeker, NEW(Seeker));
86 .entity tag_target, wps_tag_tracker;
92 spawnfunc(weapon_seeker) { weapon_defaultspawnfunc(this, WEP_SEEKER); }
94 // ============================
95 // Begin: Missile functions, these are general functions to be manipulated by other code
96 // ============================
97 void W_Seeker_Missile_Explode()
99 self.event_damage = func_null;
100 RadiusDamage(self, self.realowner, WEP_CVAR(seeker, missile_damage), WEP_CVAR(seeker, missile_edgedamage), WEP_CVAR(seeker, missile_radius), world, world, WEP_CVAR(seeker, missile_force), self.projectiledeathtype, other);
105 void W_Seeker_Missile_Touch()
109 W_Seeker_Missile_Explode();
112 void W_Seeker_Missile_Think()
115 vector desireddir, olddir, newdir, eorg;
122 self.projectiledeathtype |= HITTYPE_SPLASH;
123 W_Seeker_Missile_Explode();
126 spd = vlen(self.velocity);
128 spd - WEP_CVAR(seeker, missile_decel) * frametime,
129 WEP_CVAR(seeker, missile_speed_max),
130 spd + WEP_CVAR(seeker, missile_accel) * frametime
133 if(self.enemy != world)
134 if(self.enemy.takedamage != DAMAGE_AIM || IS_DEAD(self.enemy))
137 if(self.enemy != world)
140 eorg = 0.5 * (e.absmin + e.absmax);
141 turnrate = WEP_CVAR(seeker, missile_turnrate); // how fast to turn
142 desireddir = normalize(eorg - self.origin);
143 olddir = normalize(self.velocity); // get my current direction
144 dist = vlen(eorg - self.origin);
146 // Do evasive maneuvers for world objects? ( this should be a cpu hog. :P )
147 if(WEP_CVAR(seeker, missile_smart) && (dist > WEP_CVAR(seeker, missile_smart_mindist)))
149 // Is it a better idea (shorter distance) to trace to the target itself?
150 if( vdist(self.origin + olddir * self.wait, <, dist))
151 traceline(self.origin, self.origin + olddir * self.wait, false, self);
153 traceline(self.origin, eorg, false, self);
155 // Setup adaptive tracelength
156 self.wait = bound(WEP_CVAR(seeker, missile_smart_trace_min), vlen(self.origin - trace_endpos), self.wait = WEP_CVAR(seeker, missile_smart_trace_max));
158 // Calc how important it is that we turn and add this to the desierd (enemy) dir.
159 desireddir = normalize(((trace_plane_normal * (1 - trace_fraction)) + (desireddir * trace_fraction)) * 0.5);
162 newdir = normalize(olddir + desireddir * turnrate); // take the average of the 2 directions; not the best method but simple & easy
163 self.velocity = newdir * spd; // make me fly in the new direction at my flight speed
169 if(WEP_CVAR(seeker, missile_proxy))
171 if(dist <= WEP_CVAR(seeker, missile_proxy_maxrange))
173 if(self.autoswitch == 0)
175 self.autoswitch = time + WEP_CVAR(seeker, missile_proxy_delay);
179 if(self.autoswitch <= time)
181 W_Seeker_Missile_Explode();
188 if(self.autoswitch != 0)
194 if(IS_DEAD(self.enemy))
197 self.cnt = time + 1 + (random() * 4);
198 self.nextthink = self.cnt;
202 //self.angles = vectoangles(self.velocity); // turn model in the new flight direction
203 self.nextthink = time;// + 0.05; // csqc projectiles
204 UpdateCSQCProjectile(self);
209 void W_Seeker_Missile_Damage(entity this, entity inflictor, entity attacker, float damage, int deathtype, vector hitloc, vector force)
214 if(!W_CheckProjectileDamage(inflictor.realowner, this.realowner, deathtype, -1)) // no exceptions
215 return; // g_projectiles_damage says to halt
217 if(this.realowner == attacker)
218 this.health = this.health - (damage * 0.25);
220 this.health = this.health - damage;
223 WITH(entity, self, this, W_PrepareExplosionByDamage(attacker, W_Seeker_Missile_Explode));
227 void W_Seeker_Missile_Animate()
229 self.frame = self.frame +1;
230 self.nextthink = time + 0.05;
232 if(self.enemy != world)
233 if(self.enemy.takedamage != DAMAGE_AIM || IS_DEAD(self.enemy))
238 self.think = W_Seeker_Missile_Think;
239 self.nextthink = time;// + cvar("g_balance_seeker_missile_activate_delay"); // cant dealy with csqc projectiles
241 if(autocvar_g_balance_seeker_missile_proxy)
242 self.movetype = MOVETYPE_BOUNCEMISSILE;
244 self.movetype = MOVETYPE_FLYMISSILE;
247 UpdateCSQCProjectile(self);
251 void W_Seeker_Fire_Missile(Weapon thiswep, vector f_diff, entity m_target)
255 W_DecreaseAmmo(thiswep, self, WEP_CVAR(seeker, missile_ammo));
257 makevectors(self.v_angle);
258 W_SetupShot_ProjectileSize(self, '-2 -2 -2', '2 2 2', false, 2, SND(SEEKER_FIRE), CH_WEAPON_A, 0);
260 Send_Effect(EFFECT_SEEKER_MUZZLEFLASH, w_shotorg, w_shotdir * 1000, 1);
262 //self.detornator = false;
264 missile = new(seeker_missile);
265 missile.owner = missile.realowner = self;
266 missile.bot_dodge = true;
267 missile.bot_dodgerating = WEP_CVAR(seeker, missile_damage);
269 missile.think = W_Seeker_Missile_Think;
270 missile.touch = W_Seeker_Missile_Touch;
271 missile.event_damage = W_Seeker_Missile_Damage;
272 missile.nextthink = time;// + 0.2;// + cvar("g_balance_seeker_missile_activate_delay");
273 missile.cnt = time + WEP_CVAR(seeker, missile_lifetime);
274 missile.enemy = m_target;
275 missile.solid = SOLID_BBOX;
277 missile.takedamage = DAMAGE_YES;
278 missile.health = WEP_CVAR(seeker, missile_health);
279 missile.damageforcescale = WEP_CVAR(seeker, missile_damageforcescale);
280 missile.damagedbycontents = true;
281 //missile.think = W_Seeker_Missile_Animate; // csqc projectiles.
283 if(missile.enemy != world)
284 missile.projectiledeathtype = WEP_SEEKER.m_id | HITTYPE_SECONDARY;
286 missile.projectiledeathtype = WEP_SEEKER.m_id;
289 setorigin(missile, w_shotorg);
290 setsize(missile, '-4 -4 -4', '4 4 4');
291 missile.movetype = MOVETYPE_FLYMISSILE;
292 missile.flags = FL_PROJECTILE;
293 missile.missile_flags = MIF_SPLASH | MIF_GUIDED_TAG;
295 W_SetupProjVelocity_UP_PRE(missile, seeker, missile_);
297 missile.angles = vectoangles(missile.velocity);
299 CSQCProjectile(missile, false, PROJECTILE_SEEKER, true);
301 MUTATOR_CALLHOOK(EditProjectile, self, missile);
304 // ============================
305 // Begin: FLAC, close range attack meant for defeating rockets which are coming at you.
306 // ============================
307 void W_Seeker_Flac_Explode()
309 self.event_damage = func_null;
311 RadiusDamage(self, self.realowner, WEP_CVAR(seeker, flac_damage), WEP_CVAR(seeker, flac_edgedamage), WEP_CVAR(seeker, flac_radius), world, world, WEP_CVAR(seeker, flac_force), self.projectiledeathtype, other);
316 void W_Seeker_Flac_Touch()
320 W_Seeker_Flac_Explode();
323 void W_Seeker_Fire_Flac(Weapon thiswep)
329 W_DecreaseAmmo(thiswep, self, WEP_CVAR(seeker, flac_ammo));
331 c = self.bulletcounter % 4;
335 f_diff = '-1.25 -3.75 0';
338 f_diff = '+1.25 -3.75 0';
341 f_diff = '-1.25 +3.75 0';
345 f_diff = '+1.25 +3.75 0';
348 W_SetupShot_ProjectileSize(self, '-2 -2 -2', '2 2 2', false, 2, SND(FLAC_FIRE), CH_WEAPON_A, WEP_CVAR(seeker, flac_damage));
351 Send_Effect(EFFECT_HAGAR_MUZZLEFLASH, w_shotorg, w_shotdir * 1000, 1);
353 missile = new(missile);
354 missile.owner = missile.realowner = self;
355 missile.bot_dodge = true;
356 missile.bot_dodgerating = WEP_CVAR(seeker, flac_damage);
357 missile.touch = W_Seeker_Flac_Explode;
358 missile.use = W_Seeker_Flac_Explode;
359 missile.think = adaptor_think2use_hittype_splash;
360 missile.nextthink = time + WEP_CVAR(seeker, flac_lifetime) + WEP_CVAR(seeker, flac_lifetime_rand);
361 missile.solid = SOLID_BBOX;
362 missile.movetype = MOVETYPE_FLY;
363 missile.projectiledeathtype = WEP_SEEKER.m_id;
364 missile.projectiledeathtype = WEP_SEEKER.m_id | HITTYPE_SECONDARY;
365 missile.flags = FL_PROJECTILE;
366 missile.missile_flags = MIF_SPLASH;
369 //missile.angles = vectoangles(missile.velocity);
370 //missile.scale = 0.4; // BUG: the model is too big
372 setorigin(missile, w_shotorg);
373 setsize(missile, '-2 -2 -2', '2 2 2');
375 W_SetupProjVelocity_UP_PRE(missile, seeker, flac_);
376 CSQCProjectile(missile, true, PROJECTILE_FLAC, true);
378 MUTATOR_CALLHOOK(EditProjectile, self, missile);
381 // ============================
382 // Begin: Tag and rocket controllers
383 // ============================
384 entity W_Seeker_Tagged_Info(entity isowner, entity istarget)
387 for(tag = world; (tag = find(tag, classname, "tag_tracker")); )
388 if((tag.realowner == isowner) && (tag.tag_target == istarget))
394 void W_Seeker_Attack()
396 entity tracker, closest_target;
398 closest_target = world;
399 for(tracker = world; (tracker = find(tracker, classname, "tag_tracker")); ) if (tracker.realowner == self)
403 if(vlen2(self.origin - tracker.tag_target.origin) < vlen2(self.origin - closest_target.origin))
404 closest_target = tracker.tag_target;
407 closest_target = tracker.tag_target;
410 traceline(self.origin + self.view_ofs, closest_target.origin, MOVE_NOMONSTERS, self);
411 if((!closest_target) || ((trace_fraction < 1) && (trace_ent != closest_target)))
412 closest_target = world;
414 W_Seeker_Fire_Missile(WEP_SEEKER, '0 0 0', closest_target);
417 void W_Seeker_Vollycontroller_Think() // TODO: Merge this with W_Seeker_Attack
421 self.cnt = self.cnt - 1;
423 Weapon thiswep = WEP_SEEKER;
424 if((!(self.realowner.items & IT_UNLIMITED_AMMO) && self.realowner.(thiswep.ammo_field) < WEP_CVAR(seeker, missile_ammo)) || (self.cnt <= -1) || (IS_DEAD(self.realowner)) || (PS(self.realowner).m_switchweapon != WEP_SEEKER))
430 self.nextthink = time + WEP_CVAR(seeker, missile_delay) * W_WeaponRateFactor();
432 setself(self.realowner);
434 oldenemy = self.enemy;
435 self.enemy = this.enemy;
441 W_Seeker_Fire_Missile(WEP_SEEKER, '-1.25 -3.75 0', self.enemy);
444 W_Seeker_Fire_Missile(WEP_SEEKER, '+1.25 -3.75 0', self.enemy);
447 W_Seeker_Fire_Missile(WEP_SEEKER, '-1.25 +3.75 0', self.enemy);
451 W_Seeker_Fire_Missile(WEP_SEEKER, '+1.25 +3.75 0', self.enemy);
455 self.enemy = oldenemy;
459 void W_Seeker_Tracker_Think()
461 // commit suicide if: You die OR target dies OR you switch away from the seeker OR commit suicide if lifetime is up
462 if((IS_DEAD(self.realowner)) || (IS_DEAD(self.tag_target)) || (PS(self.realowner).m_switchweapon != WEP_SEEKER)
463 || (time > self.tag_time + WEP_CVAR(seeker, tag_tracker_lifetime)))
467 WaypointSprite_Kill(self.tag_target.wps_tag_tracker);
473 // Update the think method information
474 self.nextthink = time;
477 // ============================
478 // Begin: Tag projectile
479 // ============================
480 void W_Seeker_Tag_Explode(entity this)
482 //if(other==this.realowner)
484 Damage_DamageInfo(this.origin, 0, 0, 0, this.velocity, WEP_SEEKER.m_id | HITTYPE_BOUNCE, other.species, this);
489 void W_Seeker_Tag_Damage(entity this, entity inflictor, entity attacker, float damage, int deathtype, vector hitloc, vector force)
493 this.health = this.health - damage;
495 W_Seeker_Tag_Explode(this);
498 void W_Seeker_Tag_Touch()
506 dir = normalize(self.realowner.origin - self.origin);
507 org2 = findbetterlocation(self.origin, 8);
509 te_knightspike(org2);
511 self.event_damage = func_null;
512 Damage_DamageInfo(self.origin, 0, 0, 0, self.velocity, WEP_SEEKER.m_id | HITTYPE_BOUNCE | HITTYPE_SECONDARY, other.species, self);
514 if(other.takedamage == DAMAGE_AIM && !IS_DEAD(other))
516 // check to see if this person is already tagged by me
517 entity tag = W_Seeker_Tagged_Info(self.realowner, other);
521 if(other.wps_tag_tracker && (WEP_CVAR(seeker, type) == 1)) // don't attach another waypointsprite without killing the old one first
522 WaypointSprite_Kill(other.wps_tag_tracker);
528 //sprint(self.realowner, strcat("You just tagged ^2", other.netname, "^7 with a tracking device!\n"));
529 e = new(tag_tracker);
530 e.cnt = WEP_CVAR(seeker, missile_count);
531 e.owner = self.owner;
532 e.realowner = self.realowner;
534 if(WEP_CVAR(seeker, type) == 1)
536 e.tag_target = other;
538 e.think = W_Seeker_Tracker_Think;
543 e.think = W_Seeker_Vollycontroller_Think;
549 if(WEP_CVAR(seeker, type) == 1)
551 WaypointSprite_Spawn(WP_Seeker, WEP_CVAR(seeker, tag_tracker_lifetime), 0, other, '0 0 64', self.realowner, 0, other, wps_tag_tracker, true, RADARICON_TAGGED);
552 WaypointSprite_UpdateRule(other.wps_tag_tracker, 0, SPRITERULE_DEFAULT);
560 void W_Seeker_Fire_Tag(Weapon thiswep)
563 W_DecreaseAmmo(thiswep, self, WEP_CVAR(seeker, tag_ammo));
565 W_SetupShot_ProjectileSize(self, '-2 -2 -2', '2 2 2', false, 2, SND(TAG_FIRE), CH_WEAPON_A, WEP_CVAR(seeker, missile_damage) * WEP_CVAR(seeker, missile_count));
567 missile = new(seeker_tag);
568 missile.owner = missile.realowner = self;
569 missile.bot_dodge = true;
570 missile.bot_dodgerating = 50;
571 missile.touch = W_Seeker_Tag_Touch;
572 missile.think = SUB_Remove_self;
573 missile.nextthink = time + WEP_CVAR(seeker, tag_lifetime);
574 missile.movetype = MOVETYPE_FLY;
575 missile.solid = SOLID_BBOX;
577 missile.takedamage = DAMAGE_YES;
578 missile.event_damage = W_Seeker_Tag_Damage;
579 missile.health = WEP_CVAR(seeker, tag_health);
580 missile.damageforcescale = WEP_CVAR(seeker, tag_damageforcescale);
582 setorigin(missile, w_shotorg);
583 setsize(missile, '-2 -2 -2', '2 2 2');
585 missile.flags = FL_PROJECTILE;
586 //missile.missile_flags = MIF_..?;
588 missile.movetype = MOVETYPE_FLY;
589 W_SetupProjVelocity_PRE(missile, seeker, tag_);
590 missile.angles = vectoangles(missile.velocity);
592 CSQCProjectile(missile, true, PROJECTILE_TAG, false); // has sound
594 MUTATOR_CALLHOOK(EditProjectile, self, missile);
597 // ============================
598 // Begin: Genereal weapon functions
599 // ============================
601 METHOD(Seeker, wr_aim, void(entity thiswep))
603 if(WEP_CVAR(seeker, type) == 1)
604 if(W_Seeker_Tagged_Info(self, self.enemy) != world)
605 PHYS_INPUT_BUTTON_ATCK(self) = bot_aim(WEP_CVAR(seeker, missile_speed_max), 0, WEP_CVAR(seeker, missile_lifetime), false);
607 PHYS_INPUT_BUTTON_ATCK2(self) = bot_aim(WEP_CVAR(seeker, tag_speed), 0, WEP_CVAR(seeker, tag_lifetime), false);
609 PHYS_INPUT_BUTTON_ATCK(self) = bot_aim(WEP_CVAR(seeker, tag_speed), 0, WEP_CVAR(seeker, tag_lifetime), false);
611 METHOD(Seeker, wr_think, void(entity thiswep, entity actor, .entity weaponentity, int fire))
613 if(autocvar_g_balance_seeker_reload_ammo && actor.clip_load < min(WEP_CVAR(seeker, missile_ammo), WEP_CVAR(seeker, tag_ammo))) { // forced reload
614 thiswep.wr_reload(thiswep, actor, weaponentity);
617 if(WEP_CVAR(seeker, type) == 1)
619 if(weapon_prepareattack(thiswep, actor, weaponentity, false, WEP_CVAR(seeker, missile_refire)))
622 weapon_thinkf(actor, weaponentity, WFRAME_FIRE2, WEP_CVAR(seeker, missile_animtime), w_ready);
627 if(weapon_prepareattack(thiswep, actor, weaponentity, false, WEP_CVAR(seeker, tag_refire)))
629 W_Seeker_Fire_Tag(thiswep);
630 weapon_thinkf(actor, weaponentity, WFRAME_FIRE2, WEP_CVAR(seeker, tag_animtime), w_ready);
637 if(WEP_CVAR(seeker, type) == 1)
639 if(weapon_prepareattack(thiswep, actor, weaponentity, false, WEP_CVAR(seeker, tag_refire)))
641 W_Seeker_Fire_Tag(thiswep);
642 weapon_thinkf(actor, weaponentity, WFRAME_FIRE2, WEP_CVAR(seeker, tag_animtime), w_ready);
647 if(weapon_prepareattack(thiswep, actor, weaponentity, false, WEP_CVAR(seeker, flac_refire)))
649 W_Seeker_Fire_Flac(thiswep);
650 weapon_thinkf(actor, weaponentity, WFRAME_FIRE2, WEP_CVAR(seeker, flac_animtime), w_ready);
655 METHOD(Seeker, wr_checkammo1, bool(entity thiswep))
658 if(WEP_CVAR(seeker, type) == 1)
660 ammo_amount = self.(thiswep.ammo_field) >= WEP_CVAR(seeker, missile_ammo);
661 ammo_amount += self.(weapon_load[WEP_SEEKER.m_id]) >= WEP_CVAR(seeker, missile_ammo);
665 ammo_amount = self.(thiswep.ammo_field) >= WEP_CVAR(seeker, tag_ammo);
666 ammo_amount += self.(weapon_load[WEP_SEEKER.m_id]) >= WEP_CVAR(seeker, tag_ammo);
670 METHOD(Seeker, wr_checkammo2, bool(entity thiswep))
673 if(WEP_CVAR(seeker, type) == 1)
675 ammo_amount = self.(thiswep.ammo_field) >= WEP_CVAR(seeker, tag_ammo);
676 ammo_amount += self.(weapon_load[WEP_SEEKER.m_id]) >= WEP_CVAR(seeker, tag_ammo);
680 ammo_amount = self.(thiswep.ammo_field) >= WEP_CVAR(seeker, flac_ammo);
681 ammo_amount += self.(weapon_load[WEP_SEEKER.m_id]) >= WEP_CVAR(seeker, flac_ammo);
685 METHOD(Seeker, wr_reload, void(entity thiswep, entity actor, .entity weaponentity))
687 W_Reload(self, min(WEP_CVAR(seeker, missile_ammo), WEP_CVAR(seeker, tag_ammo)), SND(RELOAD));
689 METHOD(Seeker, wr_suicidemessage, Notification(entity thiswep))
691 return WEAPON_SEEKER_SUICIDE;
693 METHOD(Seeker, wr_killmessage, Notification(entity thiswep))
695 if(w_deathtype & HITTYPE_SECONDARY)
696 return WEAPON_SEEKER_MURDER_TAG;
698 return WEAPON_SEEKER_MURDER_SPRAY;
704 METHOD(Seeker, wr_impacteffect, void(entity thiswep))
707 org2 = w_org + w_backoff * 6;
708 if(w_deathtype & HITTYPE_BOUNCE)
710 if(w_deathtype & HITTYPE_SECONDARY)
713 sound(self, CH_SHOTS, SND_TAG_IMPACT, 1, ATTEN_NORM);
717 pointparticles(EFFECT_HAGAR_EXPLODE, org2, '0 0 0', 1);
721 sound(self, CH_SHOTS, SND_TAGEXP1, 1, ATTEN_NORM);
722 else if(w_random<0.7)
723 sound(self, CH_SHOTS, SND_TAGEXP2, 1, ATTEN_NORM);
725 sound(self, CH_SHOTS, SND_TAGEXP3, 1, ATTEN_NORM);
731 pointparticles(EFFECT_HAGAR_EXPLODE, org2, '0 0 0', 1);
735 sound(self, CH_SHOTS, SND_SEEKEREXP1, 1, ATTEN_NORM);
736 else if(w_random<0.7)
737 sound(self, CH_SHOTS, SND_SEEKEREXP2, 1, ATTEN_NORM);
739 sound(self, CH_SHOTS, SND_SEEKEREXP3, 1, ATTEN_NORM);