12 WEP_CVAR(WEP_SEEKER, missile_damage),
13 WEP_CVAR(WEP_SEEKER, missile_edgedamage),
14 WEP_CVAR(WEP_SEEKER, missile_radius),
49 WEP_CVAR(WEP_SEEKER, missile_speed_max),
66 if (
WEP_CVAR(WEP_SEEKER, missile_smart) && dist >
WEP_CVAR(WEP_SEEKER, missile_smart_mindist))
70 traceline(this.
origin, this.
origin + olddir * this.wait,
false,
this);
72 traceline(this.
origin, eorg,
false,
this);
88 if (
WEP_CVAR(WEP_SEEKER, missile_proxy))
90 if (dist <=
WEP_CVAR(WEP_SEEKER, missile_proxy_maxrange))
92 if (this.cvar_cl_autoswitch == 0)
93 this.cvar_cl_autoswitch =
time +
WEP_CVAR(WEP_SEEKER, missile_proxy_delay);
96 if (this.cvar_cl_autoswitch <=
time)
99 this.cvar_cl_autoswitch = 0;
105 if (this.cvar_cl_autoswitch != 0)
106 this.cvar_cl_autoswitch = 0;
176 entity missile =
new(seeker_missile);
177 missile.owner = missile.realowner = actor;
178 missile.bot_dodge =
true;
179 missile.bot_dodgerating =
WEP_CVAR(WEP_SEEKER, missile_damage);
184 missile.nextthink =
time;
185 missile.cnt =
time +
WEP_CVAR(WEP_SEEKER, missile_lifetime);
186 missile.enemy = m_target;
190 missile.weaponentity_fld = weaponentity;
192 missile.damageforcescale =
WEP_CVAR(WEP_SEEKER, missile_damageforcescale);
193 missile.damagedbycontents =
true;
197 if (missile.enemy !=
NULL)
200 missile.projectiledeathtype = thiswep.
m_id;
203 setsize(missile,
'-4 -4 -4',
'4 4 4');
228 WEP_CVAR(WEP_SEEKER, flac_edgedamage),
256 switch (actor.(weaponentity).bulletcounter % 4)
259 f_diff =
'-1.25 -3.75 0';
262 f_diff =
'+1.25 -3.75 0';
265 f_diff =
'-1.25 +3.75 0';
269 f_diff =
'+1.25 +3.75 0';
272 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);
279 missile =
new(missile);
280 missile.owner = missile.realowner = actor;
281 missile.bot_dodge =
true;
282 missile.bot_dodgerating =
WEP_CVAR(WEP_SEEKER, flac_damage);
286 missile.nextthink =
time +
WEP_CVAR(WEP_SEEKER, flac_lifetime) +
WEP_CVAR(WEP_SEEKER, flac_lifetime_rand);
290 missile.weaponentity_fld = weaponentity;
301 setsize(missile,
'-2 -2 -2',
'2 2 2');
316 if (it.tag_target == istarget && it.weaponentity_fld == weaponentity)
331 if (vlen2(actor.origin - it.tag_target.origin) < vlen2(actor.origin - closest_target.origin))
332 closest_target = it.tag_target;
335 closest_target = it.tag_target;
340 traceline(actor.origin + actor.view_ofs, closest_target.origin,
MOVE_NOMONSTERS, actor);
342 closest_target =
NULL;
352 Weapon thiswep = WEP_SEEKER;
365 entity oldenemy = own.enemy;
366 own.enemy = this.
enemy;
385 own.enemy = oldenemy;
393 || (
time >
this.tag_time +
WEP_CVAR(WEP_SEEKER, tag_tracker_lifetime)))
436 te_knightspike(org2);
456 entity e =
new(tag_tracker);
458 e.cnt =
WEP_CVAR(WEP_SEEKER, missile_count);
459 e.owner = this.
owner;
463 if (
WEP_CVAR(WEP_SEEKER, type) == 1)
478 if (
WEP_CVAR(WEP_SEEKER, type) == 1)
480 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);
493 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);
495 entity missile =
new(seeker_tag);
496 missile.weaponentity_fld = weaponentity;
497 missile.owner = missile.realowner = actor;
498 missile.bot_dodge =
true;
499 missile.bot_dodgerating = 50;
502 missile.nextthink =
time +
WEP_CVAR(WEP_SEEKER, tag_lifetime);
509 missile.damageforcescale =
WEP_CVAR(WEP_SEEKER, tag_damageforcescale);
512 setsize(missile,
'-2 -2 -2',
'2 2 2');
534 if (
WEP_CVAR(WEP_SEEKER, type) == 1)
547 if (autocvar_g_balance_seeker_reload_ammo && actor.(weaponentity).clip_load <
min(
WEP_CVAR(WEP_SEEKER, missile_ammo),
WEP_CVAR(WEP_SEEKER, tag_ammo)))
549 thiswep.wr_reload(thiswep, actor, weaponentity);
555 if (
WEP_CVAR(WEP_SEEKER, type) == 1)
574 if (
WEP_CVAR(WEP_SEEKER, type) == 1)
596 if (
WEP_CVAR(WEP_SEEKER, type) == 1)
599 ammo_amount += actor.(weaponentity).(
weapon_load[thiswep.m_id]) >=
WEP_CVAR(WEP_SEEKER, missile_ammo);
604 ammo_amount += actor.(weaponentity).(
weapon_load[thiswep.m_id]) >=
WEP_CVAR(WEP_SEEKER, tag_ammo);
612 if (
WEP_CVAR(WEP_SEEKER, type) == 1)
615 ammo_amount += actor.(weaponentity).(
weapon_load[thiswep.m_id]) >=
WEP_CVAR(WEP_SEEKER, tag_ammo);
620 ammo_amount += actor.(weaponentity).(
weapon_load[thiswep.m_id]) >=
WEP_CVAR(WEP_SEEKER, flac_ammo);
632 return WEAPON_SEEKER_SUICIDE;
638 return WEAPON_SEEKER_MURDER_TAG;
640 return WEAPON_SEEKER_MURDER_SPRAY;
679 PAR(_(
"The %s is a unique weapon, firing a \"tag\" which then launches a few homing missiles if it collides with a player. "
680 "The homing isn't perfect, so sometimes the missiles can hit an object or a corner."),
COLORED_NAME(
this));
681 PAR(_(
"The secondary fire launches a rapid barrage of scattered explosives that travel only a short distance."));
682 PAR(_(
"It consumes %s ammo, even when the tag doesn't land."),
COLORED_NAME(ITEM_Rockets));
683 PAR(_(
"The %s primary fire deals quite a lot of damage when a tag lands, although it requires skill to aim effectively. "
684 "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(id,...)
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.
bool SetResourceExplicit(entity e, Resource res_type, float amount)
Sets the resource amount of an entity without calling any hooks.
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)
vector findbetterlocation(vector org, float mindist)
const float MOVE_NOMONSTERS
vector trace_plane_normal
void UpdateCSQCProjectile(entity e)
void CSQCProjectile(entity e, float clientanimate, int type, float docull)
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_SECONDARY
void SUB_Remove(entity this)
Remove entity.
#define pointparticles(effect, org, vel, howmany)
ERASEABLE entity IL_PUSH(IntrusiveList this, entity it)
Push to tail.
#define IL_EACH(this, cond, body)
void set_movetype(entity this, int mt)
const int MOVETYPE_FLYMISSILE
entity Notification
always last
#define METHOD(cname, name, prototype)
const int PROJECTILE_FLAC
const int PROJECTILE_SEEKER
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)
void W_Seeker_Fire_Missile(Weapon thiswep, entity actor,.entity weaponentity, vector f_diff, entity m_target)
entity W_Seeker_Tagged_Info(entity isowner,.entity weaponentity, entity istarget)
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_Tracker_Think(entity this)
void W_Seeker_Tag_Explode(entity this)
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_PrepareExplosionByDamage(entity this, entity attacker, void(entity this) explode)
void adaptor_think2use_hittype_splash(entity this)
#define PROJECTILE_TOUCH(e, t)
IntrusiveList g_projectiles
#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...
#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)
#define vdist(v, cmp, f)
Vector distance comparison, avoids sqrt()
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)
string W_Guide_DPS_primaryMultishot(string name, string pri, string sec, string shots, string refire2)
void W_MuzzleFlash(Weapon thiswep, entity actor,.entity weaponentity, vector shotorg, vector shotdir)
#define WEP_CVAR(wep, name)
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)]