5 void W_OverkillMachineGun_Attack_Auto(
Weapon thiswep,
entity actor, .
entity weaponentity,
int fire)
7 float okmachinegun_spread;
11 w_ready(thiswep, actor, weaponentity, fire);
15 if(!thiswep.wr_checkammo1(thiswep, actor, weaponentity))
16 if(!(actor.items & IT_UNLIMITED_AMMO))
19 w_ready(thiswep, actor, weaponentity, fire);
28 actor.punchangle_x =
random() - 0.5;
29 actor.punchangle_y =
random() - 0.5;
33 fireBullet(actor, weaponentity,
w_shotorg,
w_shotdir, okmachinegun_spread,
WEP_CVAR_PRI(okmachinegun, solidpenetration),
WEP_CVAR_PRI(okmachinegun, damage), 0,
WEP_CVAR_PRI(okmachinegun, force), WEP_OVERKILL_MACHINEGUN.m_id, EFFECT_RIFLE);
39 if(autocvar_g_casings >= 2)
51 if(
vdist(actor.origin - actor.enemy.origin, <, 3000 -
bound(0,
skill, 10) * 200))
57 if ((
WEP_CVAR_SEC(okmachinegun, refire_type) == 1) && (fire & 2) && (
time >= actor.jump_interval))
61 BLASTER_SECONDARY_ATTACK(okmachinegun, actor, weaponentity);
62 if ((actor.(weaponentity).wframe == WFRAME_IDLE) ||
63 (actor.(weaponentity).wframe == WFRAME_FIRE2))
66 actor.(weaponentity).wframe = WFRAME_FIRE2;
68 if (it == actor || (
IS_SPEC(it) && it.enemy == actor))
70 wframe_send(it, actor.(weaponentity), WFRAME_FIRE2, autocvar_g_weaponratefactor, true);
79 thiswep.wr_reload(thiswep, actor, weaponentity);
89 W_OverkillMachineGun_Attack_Auto(thiswep, actor, weaponentity, fire);
92 if ((fire & 2) && (
WEP_CVAR_SEC(okmachinegun, refire_type) == 0))
98 BLASTER_SECONDARY_ATTACK(okmachinegun, actor, weaponentity);
107 if (
WEP_CVAR(okmachinegun, reload_ammo))
126 return WEAPON_THINKING_WITH_PORTALS;
131 return WEAPON_OVERKILL_MACHINEGUN_MURDER;
140 org2 = w_org + w_backoff * 2;
141 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 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
#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)
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)