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;
189 missile.weaponentity_fld = weaponentity;
191 missile.damageforcescale =
WEP_CVAR(WEP_SEEKER, missile_damageforcescale);
192 missile.damagedbycontents =
true;
196 if (missile.enemy !=
NULL)
199 missile.projectiledeathtype = thiswep.
m_id;
203 setsize(missile,
'-4 -4 -4',
'4 4 4');
228 WEP_CVAR(WEP_SEEKER, flac_edgedamage),
258 switch (actor.(weaponentity).bulletcounter % 4)
261 f_diff =
'-1.25 -3.75 0';
264 f_diff =
'+1.25 -3.75 0';
267 f_diff =
'-1.25 +3.75 0';
271 f_diff =
'+1.25 +3.75 0';
274 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);
281 missile =
new(missile);
282 missile.owner = missile.realowner = actor;
283 missile.bot_dodge =
true;
284 missile.bot_dodgerating =
WEP_CVAR(WEP_SEEKER, flac_damage);
288 missile.nextthink =
time +
WEP_CVAR(WEP_SEEKER, flac_lifetime) +
WEP_CVAR(WEP_SEEKER, flac_lifetime_rand);
291 missile.weaponentity_fld = weaponentity;
303 setsize(missile,
'-2 -2 -2',
'2 2 2');
318 if (it.tag_target == istarget && it.weaponentity_fld == weaponentity)
333 if (vlen2(actor.origin - it.tag_target.origin) < vlen2(actor.origin - closest_target.origin))
334 closest_target = it.tag_target;
337 closest_target = it.tag_target;
342 traceline(actor.origin + actor.view_ofs, closest_target.origin,
MOVE_NOMONSTERS, actor);
344 closest_target =
NULL;
354 Weapon thiswep = WEP_SEEKER;
367 entity oldenemy = own.enemy;
368 own.enemy = this.
enemy;
387 own.enemy = oldenemy;
395 || (
time >
this.tag_time +
WEP_CVAR(WEP_SEEKER, tag_tracker_lifetime)))
438 te_knightspike(org2);
458 entity e =
new(tag_tracker);
460 e.cnt =
WEP_CVAR(WEP_SEEKER, missile_count);
461 e.owner = this.
owner;
465 if (
WEP_CVAR(WEP_SEEKER, type) == 1)
480 if (
WEP_CVAR(WEP_SEEKER, type) == 1)
482 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);
495 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);
497 entity missile =
new(seeker_tag);
498 missile.weaponentity_fld = weaponentity;
499 missile.owner = missile.realowner = actor;
500 missile.bot_dodge =
true;
501 missile.bot_dodgerating = 50;
504 missile.nextthink =
time +
WEP_CVAR(WEP_SEEKER, tag_lifetime);
510 missile.damageforcescale =
WEP_CVAR(WEP_SEEKER, tag_damageforcescale);
514 setsize(missile,
'-2 -2 -2',
'2 2 2');
536 if (
WEP_CVAR(WEP_SEEKER, type) == 1)
549 if (autocvar_g_balance_seeker_reload_ammo && actor.(weaponentity).clip_load <
min(
WEP_CVAR(WEP_SEEKER, missile_ammo),
WEP_CVAR(WEP_SEEKER, tag_ammo)))
551 thiswep.wr_reload(thiswep, actor, weaponentity);
557 if (
WEP_CVAR(WEP_SEEKER, type) == 1)
576 if (
WEP_CVAR(WEP_SEEKER, type) == 1)
598 if (
WEP_CVAR(WEP_SEEKER, type) == 1)
601 ammo_amount += actor.(weaponentity).(
weapon_load[thiswep.m_id]) >=
WEP_CVAR(WEP_SEEKER, missile_ammo);
606 ammo_amount += actor.(weaponentity).(
weapon_load[thiswep.m_id]) >=
WEP_CVAR(WEP_SEEKER, tag_ammo);
614 if (
WEP_CVAR(WEP_SEEKER, type) == 1)
617 ammo_amount += actor.(weaponentity).(
weapon_load[thiswep.m_id]) >=
WEP_CVAR(WEP_SEEKER, tag_ammo);
622 ammo_amount += actor.(weaponentity).(
weapon_load[thiswep.m_id]) >=
WEP_CVAR(WEP_SEEKER, flac_ammo);
634 return WEAPON_SEEKER_SUICIDE;
640 return WEAPON_SEEKER_MURDER_TAG;
642 return WEAPON_SEEKER_MURDER_SPRAY;
681 PAR(_(
"The %s is a unique weapon, firing a \"tag\" which then launches a few homing missiles if it collides with a player. "
682 "The homing isn't perfect, so sometimes the missiles can hit an object or a corner."),
COLORED_NAME(
this));
683 PAR(_(
"The secondary fire launches a rapid barrage of scattered explosives that travel only a short distance."));
684 PAR(_(
"It consumes %s ammo, even when the tag doesn't land."),
COLORED_NAME(ITEM_Rockets));
685 PAR(_(
"The %s primary fire deals quite a lot of damage when a tag lands, although it requires skill to aim effectively. "
686 "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.
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_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)
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 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 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...
#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)]