12 WEP_CVAR(WEP_SEEKER, missile_damage),
13 WEP_CVAR(WEP_SEEKER, missile_edgedamage),
14 WEP_CVAR(WEP_SEEKER, missile_radius),
50 WEP_CVAR(WEP_SEEKER, missile_speed_max),
51 WEP_CVAR(WEP_SEEKER, missile_turnrate),
53 WEP_CVAR(WEP_SEEKER, missile_smart_mindist),
54 WEP_CVAR(WEP_SEEKER, missile_smart_trace_min),
55 WEP_CVAR(WEP_SEEKER, missile_smart_trace_max));
58 if (
WEP_CVAR(WEP_SEEKER, missile_proxy))
60 if (dist <=
WEP_CVAR(WEP_SEEKER, missile_proxy_maxrange))
62 if (this.cvar_cl_autoswitch == 0)
63 this.cvar_cl_autoswitch =
time +
WEP_CVAR(WEP_SEEKER, missile_proxy_delay);
66 if (this.cvar_cl_autoswitch <=
time)
69 this.cvar_cl_autoswitch = 0;
75 if (this.cvar_cl_autoswitch != 0)
76 this.cvar_cl_autoswitch = 0;
141 if (bullet_count > 0)
144 actor.(weaponentity).
movedir = old_movedir;
149 entity missile =
new(seeker_missile);
151 missile.owner = missile.realowner = actor;
152 missile.bot_dodge =
true;
153 missile.bot_dodgerating =
WEP_CVAR(WEP_SEEKER, missile_damage);
158 missile.nextthink =
time;
159 missile.cnt =
time +
WEP_CVAR(WEP_SEEKER, missile_lifetime);
160 missile.enemy = m_target;
163 missile.weaponentity_fld = weaponentity;
165 missile.damageforcescale =
WEP_CVAR(WEP_SEEKER, missile_damageforcescale);
166 missile.damagedbycontents =
true;
170 if (missile.enemy !=
NULL)
173 missile.projectiledeathtype = thiswep.
m_id;
177 setsize(missile,
'-4 -4 -4',
'4 4 4');
202 WEP_CVAR(WEP_SEEKER, flac_edgedamage),
233 W_SetupShot_ProjectileSize(actor, weaponentity,
'-2 -2 -2',
'2 2 2',
false, 2, SND_SEEKER_FLAC_FIRE,
CH_WEAPON_A,
WEP_CVAR(WEP_SEEKER, flac_damage), thiswep.
m_id |
HITTYPE_SECONDARY);
234 actor.(weaponentity).
movedir = old_movedir;
240 missile =
new(missile);
241 missile.owner = missile.realowner = actor;
242 missile.bot_dodge =
true;
243 missile.bot_dodgerating =
WEP_CVAR(WEP_SEEKER, flac_damage);
247 missile.nextthink =
time +
WEP_CVAR(WEP_SEEKER, flac_lifetime) +
WEP_CVAR(WEP_SEEKER, flac_lifetime_rand);
250 missile.weaponentity_fld = weaponentity;
262 setsize(missile,
'-2 -2 -2',
'2 2 2');
277 if (it.tag_target == istarget && it.weaponentity_fld == weaponentity)
288 float it_dist2, closest_dist2 = 0;
292 it_trans_org = WarpZone_RefSys_TransformOrigin(it.tag_target, actor, it.tag_target.origin);
293 WarpZone_TraceLine(actor.origin + actor.view_ofs, it_trans_org, MOVE_NOMONSTERS, actor);
294 if (trace_fraction < 1 && trace_ent != it)
297 it_dist2 = vlen2(actor.origin - it_trans_org);
298 if (!closest || it_dist2 < closest_dist2)
300 closest_dist2 = it_dist2;
301 closest = it.tag_target;
312 Weapon thiswep = WEP_SEEKER;
325 entity oldenemy = own.enemy;
326 own.enemy = this.
enemy;
328 own.enemy = oldenemy;
336 || (
time >
this.tag_time +
WEP_CVAR(WEP_SEEKER, tag_tracker_lifetime)))
360 if (this.
realowner.(weaponentity).lasttag ==
this)
414 entity tracker =
new(tag_tracker);
417 tracker.cnt =
WEP_CVAR(WEP_SEEKER, missile_count);
418 tracker.owner = this.
owner;
422 if (
WEP_CVAR(WEP_SEEKER, type) == 1)
425 tracker.tag_time =
time;
434 tracker.nextthink =
time;
437 if (
WEP_CVAR(WEP_SEEKER, type) == 1)
439 WaypointSprite_Spawn(WP_Seeker,
WEP_CVAR(WEP_SEEKER, tag_tracker_lifetime), 0,
toucher,
'0 0 64', this.
realowner, 0,
toucher,
wps_tag_tracker,
true, RADARICON_TAGGED);
459 if (this.
realowner.(weaponentity).m_weapon == WEP_SEEKER
460 &&
this ==
this.realowner.(weaponentity).lasttag
461 && !
this.realowner.(weaponentity).tag_release
462 &&
WEP_CVAR(WEP_SEEKER, tag_guiderate)
468 WEP_CVAR(WEP_SEEKER, tag_guiderate),
469 WEP_CVAR(WEP_SEEKER, tag_guideratedelay),
470 WEP_CVAR(WEP_SEEKER, tag_guidegoal),
471 WEP_CVAR(WEP_SEEKER, tag_guidedelay),
481 W_SetupShot_ProjectileSize(actor, weaponentity,
'-2 -2 -2',
'2 2 2',
false, 2, SND_TAG_FIRE,
CH_WEAPON_A,
WEP_CVAR(WEP_SEEKER, missile_damage) *
WEP_CVAR(WEP_SEEKER, missile_count), thiswep.
m_id |
HITTYPE_BOUNCE |
HITTYPE_SECONDARY);
483 entity missile =
new(seeker_tag);
485 if (
WEP_CVAR(WEP_SEEKER, tag_guiderate) > 0)
487 actor.(weaponentity).
lasttag = missile;
488 missile.pushltime =
time +
WEP_CVAR(WEP_SEEKER, tag_guidedelay);
489 missile.ltime =
time +
WEP_CVAR(WEP_SEEKER, tag_lifetime);
490 missile.nextthink =
time;
495 missile.nextthink =
time +
WEP_CVAR(WEP_SEEKER, tag_lifetime);
499 missile.owner = missile.realowner = actor;
500 missile.bot_dodge =
true;
501 missile.bot_dodgerating = 50;
504 missile.projectiledeathtype = thiswep.
m_id;
505 missile.weaponentity_fld = weaponentity;
510 missile.damageforcescale =
WEP_CVAR(WEP_SEEKER, tag_damageforcescale);
514 setsize(missile,
'-2 -2 -2',
'2 2 2');
531 if (
time >= missile.nextthink)
541 if (
WEP_CVAR(WEP_SEEKER, type) == 1)
554 if (autocvar_g_balance_seeker_reload_ammo
555 && actor.(weaponentity).clip_load <
WEP_CVAR(WEP_SEEKER, missile_ammo)
556 && actor.(weaponentity).clip_load <
WEP_CVAR(WEP_SEEKER, tag_ammo))
558 thiswep.wr_reload(thiswep, actor, weaponentity);
562 if (
WEP_CVAR(WEP_SEEKER, type) == 1)
574 if ((actor.(weaponentity).tag_release ||
WEP_CVAR(WEP_SEEKER, tag_guidestop))
589 if ((actor.(weaponentity).tag_release ||
WEP_CVAR(WEP_SEEKER, tag_guidestop))
618 if (
WEP_CVAR(WEP_SEEKER, type) == 1)
621 ammo_amount += actor.(weaponentity).(
weapon_load[thiswep.m_id]) >=
WEP_CVAR(WEP_SEEKER, missile_ammo);
626 ammo_amount += actor.(weaponentity).(
weapon_load[thiswep.m_id]) >=
WEP_CVAR(WEP_SEEKER, tag_ammo);
634 if (
WEP_CVAR(WEP_SEEKER, type) == 1)
637 ammo_amount += actor.(weaponentity).(
weapon_load[thiswep.m_id]) >=
WEP_CVAR(WEP_SEEKER, tag_ammo);
642 ammo_amount += actor.(weaponentity).(
weapon_load[thiswep.m_id]) >=
WEP_CVAR(WEP_SEEKER, flac_ammo);
664 return WEAPON_SEEKER_SUICIDE;
670 return WEAPON_SEEKER_MURDER_TAG;
672 return WEAPON_SEEKER_MURDER_SPRAY;
682 static int impact_effnum;
685 static entity explode_eff;
688 ? EFFECT_HAGAR_EXPLODE
689 : EFFECT_SEEKER_EXPLODE;
696 if (impact_effnum < 0)
697 te_knightspike(org2);
726 PAR(_(
"The %s is a unique weapon, firing a \"tag\" which then launches a few homing missiles if it collides with a player. "
727 "The homing isn't perfect, so sometimes the missiles can hit an object or a corner."),
COLORED_NAME(
this));
728 PAR(_(
"The secondary fire launches a rapid barrage of scattered explosives that travel only a short distance."));
729 PAR(_(
"It consumes %s ammo, even when the tag doesn't land."),
COLORED_NAME(ITEM_Rockets));
730 PAR(_(
"The %s primary fire deals quite a lot of damage when a tag lands, although it requires skill to aim effectively. "
731 "The secondary fire is only useful in close range combat, and sometimes the explosives can damage yourself too."),
COLORED_NAME(
this));
bool bot_aim(entity this,.entity weaponentity, float shotspeed, float shotspeedupward, float maxshottime, float applygravity, bool shot_accurate)
IntrusiveList g_bot_dodge
#define MUTATOR_CALLHOOK(name,...)
var entity(vector mins, vector maxs,.entity tofield) findbox_tofield_OrFallback
float GetResource(entity e, Resource res_type)
Returns the current amount of resource the given entity has.
void TakeResource(entity receiver, Resource res_type, float amount)
Takes an entity some resource.
fields which are explicitly/manually set are marked with "M", fields set automatically are marked wit...
Resource ammo_type
M: ammotype : main ammo type.
#define COLORED_NAME(this)
const int IT_UNLIMITED_AMMO
#define PHYS_INPUT_BUTTON_ATCK(s)
#define PHYS_INPUT_BUTTON_ATCK2(s)
float W_WeaponRateFactor(entity this)
void UpdateCSQCProjectile(entity e)
void CSQCProjectile(entity e, float clientanimate, int type, float docull)
void Damage(entity targ, entity inflictor, entity attacker, float damage, int deathtype,.entity weaponentity, vector hitloc, vector force)
float RadiusDamage(entity inflictor, entity attacker, float coredamage, float edgedamage, float rad, entity cantbe, entity mustbe, float forceintensity, int deathtype,.entity weaponentity, entity directhitentity)
IntrusiveList g_damagedbycontents
void Damage_DamageInfo(vector org, float coredamage, float edgedamage, float rad, vector force, int deathtype, float bloodtype, entity dmgowner)
const int HITTYPE_BOUNCE
set manually after projectile has bounced
const int HITTYPE_SPLASH
automatically set by RadiusDamage
const int HITTYPE_SECONDARY
void SUB_Remove(entity this)
Remove entity.
#define pointparticles(effect, org, vel, howmany)
#define particleeffectnum(e)
SetResourceExplicit(ent, RES_ARMOR, ReadByte() *DEC_FACTOR)) ENTCS_PROP(NAME
ERASEABLE entity IL_PUSH(IntrusiveList this, entity it)
Push to tail.
#define IL_EACH(this, cond, body)
void WarpZone_RefSys_Copy(entity me, entity from)
Copies the warpzone reference of from onto me.
void set_movetype(entity this, int mt)
const int MOVETYPE_FLYMISSILE
entity Notification
always last
#define METHOD(cname, name, prototype)
const int PROJECTILE_SEEKER_TAG
const int PROJECTILE_SEEKER_FLAC
const int PROJECTILE_SEEKER_MISSILE
void W_Seeker_Vollycontroller_Think(entity this)
void W_Seeker_Fire_Flac(Weapon thiswep, entity actor,.entity weaponentity)
void W_Seeker_Fire_Tag(Weapon thiswep, entity actor,.entity weaponentity)
void W_Seeker_Flac_Explode(entity this, entity directhitentity)
void W_Seeker_Tag_Damage(entity this, entity inflictor, entity attacker, float damage, int deathtype,.entity weaponentity, vector hitloc, vector force)
void W_Seeker_Missile_Think(entity this)
void W_Seeker_Missile_Touch(entity this, entity toucher)
void W_Seeker_Flac_Explode_use(entity this, entity actor, entity trigger)
entity W_Seeker_Tagged_Info(entity isowner,.entity weaponentity, entity istarget)
void W_Seeker_Tag_Delete(entity this)
void W_Seeker_Tag_Touch(entity this, entity toucher)
void W_Seeker_Missile_Damage(entity this, entity inflictor, entity attacker, float damage, int deathtype,.entity weaponentity, vector hitloc, vector force)
void W_Seeker_Flac_Touch(entity this, entity toucher)
void W_Seeker_Missile_Explode(entity this, entity directhitentity)
void W_Seeker_Missile_Explode_think(entity this)
void W_Seeker_Tag_Think(entity this)
Think function, only for guided tags.
void W_Seeker_Tracker_Think(entity this)
void W_Seeker_Tag_Explode(entity this)
void W_Seeker_Fire_Missile(Weapon thiswep, entity actor,.entity weaponentity, entity m_target, int bullet_count)
void W_Seeker_Attack(Weapon thiswep, entity actor,.entity weaponentity)
Sound SND_SEEKEREXP_RANDOM(float rnd)
Sound SND_TAGEXP_RANDOM(float rnd)
IntrusiveList g_seeker_trackers
float W_CheckProjectileDamage(entity inflictor, entity projowner, int deathtype, float exception)
void W_GuideProjectile(entity this,.entity weaponentity, float guide_start_time, float guide_rate, float guide_rate_delay, float guide_goal, float guide_delay, entity eff, entity snd, float vol)
Guides a projectile towards the crosshair (v_forward).
void W_PrepareExplosionByDamage(entity this, entity attacker, void(entity this) explode)
float W_SeekOutEnemy(entity this, float speed_decel, float speed_accel, float speed_max, float turn_rate, bool smart, float smart_mindist, float smart_trace_min, float smart_trace_max)
Automatically guides a projectile towards its enemy.
void adaptor_think2use_hittype_splash(entity this)
#define PROJECTILE_TOUCH(e, t)
IntrusiveList g_projectiles
#define PROJECTILE_MAKETRIGGER(e)
#define sound(e, c, s, v, a)
#define PAR(...)
Adds an individually translatable paragraph to PAGE_TEXT without having to deal with strcat and sprin...
vector W_SetupShot_GetAlternatingOffset(int bullet_count)
#define W_SetupProjVelocity_PRE(ent, wep, prefix)
#define W_SetupProjVelocity_UP_PRE(ent, wep, prefix)
#define W_SetupShot_ProjectileSize(ent, wepent, mi, ma, antilag, recoil, snd, chan, maxdamage, deathtype)
void WaypointSprite_Kill(entity wp)
entity WaypointSprite_Spawn(entity spr, float _lifetime, float maxdistance, entity ref, vector ofs, entity showto, float t, entity own,.entity ownfield, float hideable, entity icon)
void WaypointSprite_UpdateRule(entity e, float t, float r)
const int SPRITERULE_DEFAULT
string W_Guide_Keybinds(Weapon wep)
void W_MuzzleFlash(Weapon thiswep, entity actor,.entity weaponentity, vector shotorg, vector shotdir)
string W_Guide_DPS_Seeker(string name, string pri, string sec, string other, string shots)
#define WEP_CVAR(wep, name)
const int MAX_WEAPONSLOTS
entity weaponentities[MAX_WEAPONSLOTS]
void W_DecreaseAmmo(Weapon wep, entity actor, float ammo_use,.entity weaponentity)
void W_Reload(entity actor,.entity weaponentity, float sent_ammo_min, Sound sent_sound)
void weapon_thinkf(entity actor,.entity weaponentity, WFRAME fr, float t, void(Weapon thiswep, entity actor,.entity weaponentity, int fire) func)
bool weapon_prepareattack(Weapon thiswep, entity actor,.entity weaponentity, bool secondary, float attacktime)
void w_ready(Weapon thiswep, entity actor,.entity weaponentity, int fire)
float weapon_load[REGISTRY_MAX(Weapons)]