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),
50 WEP_CVAR(WEP_SEEKER, missile_turnrate),
52 WEP_CVAR(WEP_SEEKER, missile_smart_mindist),
53 WEP_CVAR(WEP_SEEKER, missile_smart_trace_min),
54 WEP_CVAR(WEP_SEEKER, missile_smart_trace_max));
57 if (
WEP_CVAR(WEP_SEEKER, missile_proxy))
59 if (dist <=
WEP_CVAR(WEP_SEEKER, missile_proxy_maxrange))
61 if (this.cvar_cl_autoswitch == 0)
62 this.cvar_cl_autoswitch =
time +
WEP_CVAR(WEP_SEEKER, missile_proxy_delay);
65 if (this.cvar_cl_autoswitch <=
time)
68 this.cvar_cl_autoswitch = 0;
74 if (this.cvar_cl_autoswitch != 0)
75 this.cvar_cl_autoswitch = 0;
140 if (bullet_count > 0)
143 actor.(weaponentity).
movedir = old_movedir;
148 entity missile =
new(seeker_missile);
150 missile.owner = missile.realowner = actor;
151 missile.bot_dodge =
true;
152 missile.bot_dodgerating =
WEP_CVAR(WEP_SEEKER, missile_damage);
157 missile.nextthink =
time;
158 missile.cnt =
time +
WEP_CVAR(WEP_SEEKER, missile_lifetime);
159 missile.enemy = m_target;
162 missile.weaponentity_fld = weaponentity;
164 missile.damageforcescale =
WEP_CVAR(WEP_SEEKER, missile_damageforcescale);
165 missile.damagedbycontents =
true;
169 if (missile.enemy !=
NULL)
172 missile.projectiledeathtype = thiswep.
m_id;
176 setsize(missile,
'-4 -4 -4',
'4 4 4');
201 WEP_CVAR(WEP_SEEKER, flac_edgedamage),
232 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);
233 actor.(weaponentity).
movedir = old_movedir;
239 missile =
new(missile);
240 missile.owner = missile.realowner = actor;
241 missile.bot_dodge =
true;
242 missile.bot_dodgerating =
WEP_CVAR(WEP_SEEKER, flac_damage);
246 missile.nextthink =
time +
WEP_CVAR(WEP_SEEKER, flac_lifetime) +
WEP_CVAR(WEP_SEEKER, flac_lifetime_rand);
249 missile.weaponentity_fld = weaponentity;
261 setsize(missile,
'-2 -2 -2',
'2 2 2');
276 if (it.tag_target == istarget && it.weaponentity_fld == weaponentity)
287 float it_dist2, closest_dist2 = 0;
291 it_trans_org = WarpZone_RefSys_TransformOrigin(it.tag_target, actor, it.tag_target.origin);
292 WarpZone_TraceLine(actor.origin + actor.view_ofs, it_trans_org, MOVE_NOMONSTERS, actor);
293 if (trace_fraction < 1 && trace_ent != it)
296 it_dist2 = vlen2(actor.origin - it_trans_org);
297 if (!closest || it_dist2 < closest_dist2)
299 closest_dist2 = it_dist2;
300 closest = it.tag_target;
311 Weapon thiswep = WEP_SEEKER;
324 entity oldenemy = own.enemy;
325 own.enemy = this.
enemy;
327 own.enemy = oldenemy;
335 || (
time >
this.tag_time +
WEP_CVAR(WEP_SEEKER, tag_tracker_lifetime)))
392 entity e =
new(tag_tracker);
395 e.cnt =
WEP_CVAR(WEP_SEEKER, missile_count);
396 e.owner = this.
owner;
400 if (
WEP_CVAR(WEP_SEEKER, type) == 1)
415 if (
WEP_CVAR(WEP_SEEKER, type) == 1)
417 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);
430 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);
432 entity missile =
new(seeker_tag);
434 missile.weaponentity_fld = weaponentity;
435 missile.owner = missile.realowner = actor;
436 missile.bot_dodge =
true;
437 missile.bot_dodgerating = 50;
440 missile.nextthink =
time +
WEP_CVAR(WEP_SEEKER, tag_lifetime);
446 missile.damageforcescale =
WEP_CVAR(WEP_SEEKER, tag_damageforcescale);
450 setsize(missile,
'-2 -2 -2',
'2 2 2');
472 if (
WEP_CVAR(WEP_SEEKER, type) == 1)
485 if (autocvar_g_balance_seeker_reload_ammo && actor.(weaponentity).clip_load <
min(
WEP_CVAR(WEP_SEEKER, missile_ammo),
WEP_CVAR(WEP_SEEKER, tag_ammo)))
487 thiswep.wr_reload(thiswep, actor, weaponentity);
493 if (
WEP_CVAR(WEP_SEEKER, type) == 1)
512 if (
WEP_CVAR(WEP_SEEKER, type) == 1)
534 if (
WEP_CVAR(WEP_SEEKER, type) == 1)
537 ammo_amount += actor.(weaponentity).(
weapon_load[thiswep.m_id]) >=
WEP_CVAR(WEP_SEEKER, missile_ammo);
542 ammo_amount += actor.(weaponentity).(
weapon_load[thiswep.m_id]) >=
WEP_CVAR(WEP_SEEKER, tag_ammo);
550 if (
WEP_CVAR(WEP_SEEKER, type) == 1)
553 ammo_amount += actor.(weaponentity).(
weapon_load[thiswep.m_id]) >=
WEP_CVAR(WEP_SEEKER, tag_ammo);
558 ammo_amount += actor.(weaponentity).(
weapon_load[thiswep.m_id]) >=
WEP_CVAR(WEP_SEEKER, flac_ammo);
570 return WEAPON_SEEKER_SUICIDE;
576 return WEAPON_SEEKER_MURDER_TAG;
578 return WEAPON_SEEKER_MURDER_SPRAY;
588 static int impact_effnum;
591 static entity explode_eff;
594 ? EFFECT_HAGAR_EXPLODE
595 : EFFECT_SEEKER_EXPLODE;
602 if (impact_effnum < 0)
603 te_knightspike(org2);
632 PAR(_(
"The %s is a unique weapon, firing a \"tag\" which then launches a few homing missiles if it collides with a player. "
633 "The homing isn't perfect, so sometimes the missiles can hit an object or a corner."),
COLORED_NAME(
this));
634 PAR(_(
"The secondary fire launches a rapid barrage of scattered explosives that travel only a short distance."));
635 PAR(_(
"It consumes %s ammo, even when the tag doesn't land."),
COLORED_NAME(ITEM_Rockets));
636 PAR(_(
"The %s primary fire deals quite a lot of damage when a tag lands, although it requires skill to aim effectively. "
637 "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)
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)
#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_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_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_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)
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)]