22 for (
int i = 0; i < shots; ++i)
32 WEP_CVAR_BOTH(WEP_RIFLE, is_primary, damagefalloff_forcehalflife),
34 (
WEP_CVAR_BOTH(WEP_RIFLE, is_primary, tracer) ? EFFECT_RIFLE : EFFECT_RIFLE_WEAK),
63 actor.(weaponentity).
m_switchweapon = actor.(weaponentity).m_weapon;
65 float r =
weapon_prepareattack(thiswep, actor, weaponentity, actor.rifle_bullethail_frame == WFRAME_FIRE2, actor.rifle_bullethail_refire);
66 if (actor.(weaponentity).m_switchweapon == actor.(weaponentity).m_weapon)
70 actor.rifle_bullethail_attackfunc(thiswep, actor, weaponentity);
80 AttackFunc(thiswep, actor, weaponentity);
84 actor.rifle_bullethail_attackfunc = AttackFunc;
85 actor.rifle_bullethail_frame = fr;
86 actor.rifle_bullethail_animtime = animtime;
87 actor.rifle_bullethail_refire = refire;
100 if (
vdist(actor.origin - actor.enemy.origin, >, 1000))
101 actor.bot_secondary_riflemooth =
false;
102 if (!actor.bot_secondary_riflemooth)
104 if (
bot_aim(actor, weaponentity, 1000000, 0, 0.001,
false,
true))
108 actor.bot_secondary_riflemooth =
true;
113 if (
bot_aim(actor, weaponentity, 1000000, 0, 0.001,
false,
true))
117 actor.bot_secondary_riflemooth =
false;
127 thiswep.wr_reload(thiswep, actor, weaponentity);
134 &&
time >= actor.(weaponentity).rifle_accumulator +
WEP_CVAR_PRI(WEP_RIFLE, burstcost))
137 W_Rifle_BulletHail(thiswep, actor, weaponentity,
WEP_CVAR_PRI(WEP_RIFLE, bullethail),
W_Rifle_Attack, WFRAME_FIRE1,
WEP_CVAR_PRI(WEP_RIFLE, animtime),
WEP_CVAR_PRI(WEP_RIFLE, refire));
140 if ((fire & 2) &&
WEP_CVAR(WEP_RIFLE, secondary))
143 thiswep.wr_reload(thiswep, actor, weaponentity);
145 &&
time >= actor.(weaponentity).rifle_accumulator +
WEP_CVAR_SEC(WEP_RIFLE, burstcost))
148 W_Rifle_BulletHail(thiswep, actor, weaponentity,
WEP_CVAR_SEC(WEP_RIFLE, bullethail),
W_Rifle_Attack2, WFRAME_FIRE2,
WEP_CVAR_SEC(WEP_RIFLE, animtime),
WEP_CVAR_PRI(WEP_RIFLE, refire));
184 return WEAPON_THINKING_WITH_PORTALS;
192 return WEAPON_RIFLE_MURDER_HAIL_PIERCING;
194 return WEAPON_RIFLE_MURDER_HAIL;
199 return WEAPON_RIFLE_MURDER_PIERCING;
201 return WEAPON_RIFLE_MURDER;
249 PAR(_(
"The %s fires bullets that traverse the map instantaneously and deal a significant chunk of damage on impact."),
COLORED_NAME(
this));
250 PAR(_(
"The secondary fire shoots a few less powerful bullets at once with a bit of scatter."));
251 PAR(_(
"It consumes %s ammo for each bullet shot."),
COLORED_NAME(ITEM_Bullets));
252 PAR(_(
"Unlike the %s, the secondary fire doesn't zoom, so %s needs to be used manually with the %s. "
254 PAR(_(
"Similar to the %s, the %s can be used at any range, but it stands out at long ranges."),
COLORED_NAME(WEP_VORTEX),
COLORED_NAME(
this));
bool bot_aim(entity this,.entity weaponentity, float shotspeed, float shotspeedupward, float maxshottime, float applygravity, bool shot_accurate)
void SpawnCasing(vector vel, vector ang, int casingtype, entity casingowner,.entity weaponentity)
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.
fields which are explicitly/manually set are marked with "M", fields set automatically are marked wit...
#define COLORED_NAME(this)
#define PHYS_INPUT_BUTTON_ZOOMSCRIPT(s)
#define PHYS_INPUT_BUTTON_ATCK(s)
#define PHYS_INPUT_BUTTON_ZOOM(s)
#define PHYS_INPUT_BUTTON_ATCK2(s)
bool autocvar_cl_reticle_weapon
const int HITTYPE_SECONDARY
#define pointparticles(effect, org, vel, howmany)
strcat(_("^F4Countdown stopped!"), "\n^BG", _("Teams are too unbalanced."))
entity Notification
always last
#define METHOD(cname, name, prototype)
WFRAME rifle_bullethail_frame
void W_Rifle_BulletHail_Continue(Weapon thiswep, entity actor,.entity weaponentity, int fire)
void W_Rifle_Attack2(Weapon thiswep, entity actor,.entity weaponentity)
float rifle_bullethail_refire
bool bot_secondary_riflemooth
float rifle_bullethail_animtime
void W_Rifle_BulletHail(Weapon thiswep, entity actor,.entity weaponentity, float mode, void(Weapon thiswep, entity actor,.entity weaponentity) AttackFunc, WFRAME fr, float animtime, float refire)
void W_Rifle_FireBullet(Weapon thiswep,.entity weaponentity, int deathtype, Sound pSound, entity actor, bool is_primary)
void W_Rifle_Attack(Weapon thiswep, entity actor,.entity weaponentity)
#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...
void fireBullet_falloff(entity this,.entity weaponentity, vector start, vector dir, float spread, float max_solid_penetration, float damage, float falloff_halflife, float falloff_mindist, float falloff_maxdist, float headshot_multiplier, float force, float falloff_forcehalflife, float dtype, entity tracer_effect, bool do_antilag)
#define W_SetupShot(ent, wepent, antilag, recoil, snd, chan, maxdamage, deathtype)
#define vdist(v, cmp, f)
Vector distance comparison, avoids sqrt()
string W_Guide_Keybinds(Weapon wep)
string W_Guide_DPS_secondaryMultishot(string name, string pri, string sec, string shots, string refire2, bool sec_variable)
void W_MuzzleFlash(Weapon thiswep, entity actor,.entity weaponentity, vector shotorg, vector shotdir)
#define WEP_CVAR_PRI(wep, name)
#define WEP_CVAR_BOTH(wep, isprimary, name)
#define WEP_CVAR(wep, name)
#define WEP_CVAR_SEC(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)
void weapon_prepareattack_do(entity actor,.entity weaponentity, bool secondary, float attacktime)
bool weapon_prepareattack_check(Weapon thiswep, entity actor,.entity weaponentity, bool secondary, float attacktime)
#define ATTACK_FINISHED(ent, w)
float weapon_load[REGISTRY_MAX(Weapons)]