9 float pDF_HalfLife =
WEP_CVAR_BOTH(WEP_RIFLE, isprimary, damagefalloff_halflife);
10 float pDF_ForceHalfLife =
WEP_CVAR_BOTH(WEP_RIFLE, isprimary, damagefalloff_forcehalflife);
11 float pDF_MaxDist =
WEP_CVAR_BOTH(WEP_RIFLE, isprimary, damagefalloff_maxdist);
12 float pDF_MinDist =
WEP_CVAR_BOTH(WEP_RIFLE, isprimary, damagefalloff_mindist);
14 float pHeadshotDamage =
WEP_CVAR_BOTH(WEP_RIFLE, isprimary, headshot_multiplier);
16 float pSolidPenetration =
WEP_CVAR_BOTH(WEP_RIFLE, isprimary, solidpenetration);
32 for(
int i = 0; i < pShots; ++i)
34 pSolidPenetration, pDamage, pDF_HalfLife, pDF_MinDist,
35 pDF_MaxDist, pHeadshotDamage, pForce, pDF_ForceHalfLife,
36 deathtype, (pTracer ? EFFECT_RIFLE : EFFECT_RIFLE_WEAK),
true);
65 actor.(weaponentity).
m_switchweapon = actor.(weaponentity).m_weapon;
67 r =
weapon_prepareattack(thiswep, actor, weaponentity, actor.rifle_bullethail_frame == WFRAME_FIRE2, actor.rifle_bullethail_refire);
68 if(actor.(weaponentity).m_switchweapon == actor.(weaponentity).m_weapon)
72 actor.rifle_bullethail_attackfunc(thiswep, actor, weaponentity);
84 AttackFunc(thiswep, actor, weaponentity);
88 actor.rifle_bullethail_attackfunc = AttackFunc;
89 actor.rifle_bullethail_frame = fr;
90 actor.rifle_bullethail_animtime = animtime;
91 actor.rifle_bullethail_refire = refire;
107 if(
vdist(actor.origin - actor.enemy.origin, >, 1000))
108 actor.bot_secondary_riflemooth = 0;
109 if(actor.bot_secondary_riflemooth == 0)
111 if(
bot_aim(actor, weaponentity, 1000000, 0, 0.001,
false,
true))
114 if(
random() < 0.01) actor.bot_secondary_riflemooth = 1;
119 if(
bot_aim(actor, weaponentity, 1000000, 0, 0.001,
false,
true))
122 if(
random() < 0.03) actor.bot_secondary_riflemooth = 0;
131 thiswep.wr_reload(thiswep, actor, weaponentity);
138 if(
time >= actor.(weaponentity).rifle_accumulator +
WEP_CVAR_PRI(WEP_RIFLE, burstcost))
141 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));
149 thiswep.wr_reload(thiswep, actor, weaponentity);
154 if(
time >= actor.(weaponentity).rifle_accumulator +
WEP_CVAR_SEC(WEP_RIFLE, burstcost))
157 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));
196 return WEAPON_THINKING_WITH_PORTALS;
204 return WEAPON_RIFLE_MURDER_HAIL_PIERCING;
206 return WEAPON_RIFLE_MURDER_HAIL;
211 return WEAPON_RIFLE_MURDER_PIERCING;
213 return WEAPON_RIFLE_MURDER;
270 PAR(_(
"The %s fires bullets that traverse the map instantaneously and deal a significant chunk of damage on impact."),
COLORED_NAME(
this));
271 PAR(_(
"The secondary fire shoots a few less powerful bullets at once with a bit of scatter."));
272 PAR(_(
"It consumes %s ammo for each bullet shot."),
COLORED_NAME(ITEM_Bullets));
273 PAR(_(
"Unlike the %s, the secondary fire doesn't zoom, so %s needs to be used manually with the %s. "
275 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
void W_Rifle_FireBullet(Weapon thiswep,.entity weaponentity, int deathtype, Sound pSound, entity actor, bool isprimary)
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)
float bot_secondary_riflemooth
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)]