13 void W_OverkillHeavyMachineGun_Attack_Auto(
Weapon thiswep,
entity actor, .
entity weaponentity,
int fire)
17 w_ready(thiswep, actor, weaponentity, fire);
21 if((!thiswep.wr_checkammo1(thiswep, actor, weaponentity) && !(actor.items & IT_UNLIMITED_AMMO)) || (!StatusEffects_active(STATUSEFFECT_Superweapons, actor) && !(actor.items & IT_UNLIMITED_SUPERWEAPONS)))
24 w_ready(thiswep, actor, weaponentity, fire);
34 actor.punchangle_x =
random () - 0.5;
35 actor.punchangle_y =
random () - 0.5;
39 fireBullet(actor, weaponentity,
w_shotorg,
w_shotdir, okhmg_spread,
WEP_CVAR_PRI(okhmg, solidpenetration),
WEP_CVAR_PRI(okhmg, damage), 0,
WEP_CVAR_PRI(okhmg, force), WEP_OVERKILL_HMG.m_id, EFFECT_RIFLE);
45 if (autocvar_g_casings >= 2)
57 if(
vdist(actor.origin - actor.enemy.origin, <, 3000 -
bound(0,
skill, 10) * 200))
63 if ((
WEP_CVAR_SEC(okhmg, refire_type) == 1) && (fire & 2) && (
time >= actor.jump_interval))
67 BLASTER_SECONDARY_ATTACK(okhmg, actor, weaponentity);
68 if ((actor.(weaponentity).wframe == WFRAME_IDLE) ||
69 (actor.(weaponentity).wframe == WFRAME_FIRE2))
72 actor.(weaponentity).wframe = WFRAME_FIRE2;
74 if (it == actor || (
IS_SPEC(it) && it.enemy == actor))
76 wframe_send(it, actor.(weaponentity), WFRAME_FIRE2, autocvar_g_weaponratefactor, true);
85 thiswep.wr_reload(thiswep, actor, weaponentity);
95 W_OverkillHeavyMachineGun_Attack_Auto(thiswep, actor, weaponentity, fire);
98 if ((fire & 2) && (
WEP_CVAR_SEC(okhmg, refire_type) == 0))
104 BLASTER_SECONDARY_ATTACK(okhmg, actor, weaponentity);
112 if (autocvar_g_balance_okhmg_reload_ammo)
122 if (autocvar_g_balance_okhmg_reload_ammo)
136 return WEAPON_THINKING_WITH_PORTALS;
142 return WEAPON_OVERKILL_HMG_MURDER_SNIPE;
144 return WEAPON_OVERKILL_HMG_MURDER_SPRAY;
153 org2 = w_org + w_backoff * 2;
154 pointparticles(EFFECT_MACHINEGUN_IMPACT, org2, w_backoff * 1000, 1);
#define WEP_CVAR_PRI(wepname, name)
bool bot_aim(entity this,.entity weaponentity, float shotspeed, float shotspeedupward, float maxshottime, float applygravity)
#define WEP_CVAR_SEC(wepname, name)
float weapon_load[REGISTRY_MAX(Weapons)]
void W_SwitchWeapon_Force(Player this, Weapon w,.entity weaponentity)
#define REGISTER_MUTATOR(id, dependence)
#define w_getbestweapon(ent, wepent)
#define FOREACH_CLIENT(cond, body)
void w_ready(Weapon thiswep, entity actor,.entity weaponentity, int fire)
#define WEP_CVAR(wepname, name)
#define METHOD(cname, name, prototype)
void fireBullet(entity this,.entity weaponentity, vector start, vector dir, float spread, float max_solid_penetration, float damage, float headshot_multiplier, float force, float dtype, entity tracer_effect)
bool weapon_prepareattack(Weapon thiswep, entity actor,.entity weaponentity, bool secondary, float attacktime)
void animdecide_setaction(entity e, float action, float restart)
#define PHYS_INPUT_BUTTON_ATCK(s)
const int ANIMACTION_SHOOT
const int HITTYPE_SECONDARY
#define W_SetupShot(ent, wepent, antilag, recoil, snd, chan, maxdamage, deathtype)
vector(float skel, float bonenum) _skel_get_boneabs_hidden
float GetResource(entity e, Resource res_type)
Returns the current amount of resource the given entity has.
#define vdist(v, cmp, f)
Vector distance comparison, avoids sqrt()
entity Notification
always last
void weapon_thinkf(entity actor,.entity weaponentity, WFRAME fr, float t, void(Weapon thiswep, entity actor,.entity weaponentity, int fire) func)
#define ATTACK_FINISHED(ent, w)
#define MUTATOR_HOOKFUNCTION(...)
void W_DecreaseAmmo(Weapon wep, entity actor, float ammo_use,.entity weaponentity)
#define sound(e, c, s, v, a)
fields which are explicitly/manually set are marked with "M", fields set automatically are marked wit...
float W_WeaponRateFactor(entity this)
void W_Reload(entity actor,.entity weaponentity, float sent_ammo_min, Sound sent_sound)