animdecide_setaction(actor, ANIMACTION_SHOOT, true);
}
}
- if (WEP_CVAR(okhmg, reload_ammo) && actor.(weaponentity).clip_load < WEP_CVAR_PRI(okhmg, ammo))
+ if (WEP_CVAR(okhmg, reload_ammo) && actor.(weaponentity).clip_load < WEP_CVAR_PRI(okhmg, ammo))
{
// Forced reload.
- thiswep.wr_reload(thiswep, actor, weaponentity);
+ thiswep.wr_reload(thiswep, actor, weaponentity);
return;
}
if (fire & 1) // Primary attack
METHOD(OverkillHeavyMachineGun, wr_reload, void(entity thiswep, entity actor, .entity weaponentity))
{
- W_Reload(actor, weaponentity, WEP_CVAR_PRI(okhmg, ammo), SND_RELOAD);
+ W_Reload(actor, weaponentity, WEP_CVAR_PRI(okhmg, ammo), SND_RELOAD);
}
METHOD(OverkillHeavyMachineGun, wr_suicidemessage, Notification(entity thiswep))
{
- return WEAPON_THINKING_WITH_PORTALS;
+ return WEAPON_THINKING_WITH_PORTALS;
}
METHOD(OverkillHeavyMachineGun, wr_killmessage, Notification(entity thiswep))
{
- if(w_deathtype & HITTYPE_SECONDARY)
- return WEAPON_OVERKILL_HMG_MURDER_SNIPE;
- else
- return WEAPON_OVERKILL_HMG_MURDER_SPRAY;
+ if(w_deathtype & HITTYPE_SECONDARY)
+ return WEAPON_OVERKILL_HMG_MURDER_SNIPE;
+ else
+ return WEAPON_OVERKILL_HMG_MURDER_SPRAY;
}
#endif
METHOD(OverkillHeavyMachineGun, wr_impacteffect, void(entity thiswep, entity actor))
{
- vector org2 = w_org + w_backoff * 2;
- pointparticles(EFFECT_MACHINEGUN_IMPACT, org2, w_backoff * 1000, 1);
- if(!w_issilent)
- sound(actor, CH_SHOTS, SND_RIC_RANDOM(), VOL_BASE, ATTEN_NORM);
+ vector org2 = w_org + w_backoff * 2;
+ pointparticles(EFFECT_MACHINEGUN_IMPACT, org2, w_backoff * 1000, 1);
+ if(!w_issilent)
+ sound(actor, CH_SHOTS, SND_RIC_RANDOM(), VOL_BASE, ATTEN_NORM);
}
#endif
P(class, prefix, weaponstartoverride, float, NONE) \
P(class, prefix, weaponstart, float, NONE) \
P(class, prefix, weaponthrowable, float, NONE) \
- END()
- W_PROPS(X, OverkillHeavyMachineGun, okhmg)
+ END()
+ W_PROPS(X, OverkillHeavyMachineGun, okhmg)
#undef X
ENDCLASS(OverkillHeavyMachineGun)
/* spawnfunc */ ATTRIB(OverkillMachineGun, m_canonical_spawnfunc, string, "weapon_okmachinegun");
/* ammotype */ ATTRIB(OverkillMachineGun, ammo_type, Resource, RES_BULLETS);
/* impulse */ ATTRIB(OverkillMachineGun, impulse, int, 3);
-/* flags */ ATTRIB(OverkillMachineGun, spawnflags, int, WEP_FLAG_HIDDEN | WEP_FLAG_RELOADABLE | WEP_TYPE_HITSCAN | WEP_FLAG_PENETRATEWALLS | WEP_FLAG_MUTATORBLOCKED);
-/* rating */ ATTRIB(OverkillMachineGun, bot_pickupbasevalue, float, 7000);
-/* color */ ATTRIB(OverkillMachineGun, wpcolor, vector, '1 1 0');
+/* flags */ ATTRIB(OverkillMachineGun, spawnflags, int, WEP_FLAG_HIDDEN | WEP_FLAG_RELOADABLE | WEP_TYPE_HITSCAN | WEP_FLAG_PENETRATEWALLS | WEP_FLAG_MUTATORBLOCKED);
+/* rating */ ATTRIB(OverkillMachineGun, bot_pickupbasevalue, float, 7000);
+/* color */ ATTRIB(OverkillMachineGun, wpcolor, vector, '1 1 0');
/* modelname */ ATTRIB(OverkillMachineGun, mdl, string, "ok_mg");
#ifdef GAMEQC
-/* model */ ATTRIB(OverkillMachineGun, m_model, Model, MDL_OK_MG_ITEM);
+/* model */ ATTRIB(OverkillMachineGun, m_model, Model, MDL_OK_MG_ITEM);
/* flash mdl */ ATTRIB(OverkillMachineGun, m_muzzlemodel, Model, MDL_MACHINEGUN_MUZZLEFLASH);
/* flash eff */ ATTRIB(OverkillMachineGun, m_muzzleeffect, entity, EFFECT_MACHINEGUN_MUZZLEFLASH);
#endif
/* crosshair */ ATTRIB(OverkillMachineGun, w_crosshair, string, "gfx/crosshairuzi");
/* crosshair */ ATTRIB(OverkillMachineGun, w_crosshair_size, float, 0.6);
-/* wepimg */ ATTRIB(OverkillMachineGun, model2, string, "ok_weapon_smg");
+/* wepimg */ ATTRIB(OverkillMachineGun, model2, string, "ok_weapon_smg");
/* refname */ ATTRIB(OverkillMachineGun, netname, string, "okmachinegun");
/* wepname */ ATTRIB(OverkillMachineGun, m_name, string, _("Overkill MachineGun"));
METHOD(OverkillRocketPropelledChainsaw, wr_aim, void(entity thiswep, entity actor, .entity weaponentity))
{
- PHYS_INPUT_BUTTON_ATCK(actor) = bot_aim(actor, weaponentity, WEP_CVAR_PRI(okrpc, speed), 0, WEP_CVAR_PRI(okrpc, lifetime), false, true);
+ PHYS_INPUT_BUTTON_ATCK(actor) = bot_aim(actor, weaponentity, WEP_CVAR_PRI(okrpc, speed), 0, WEP_CVAR_PRI(okrpc, lifetime), false, true);
}
METHOD(OverkillRocketPropelledChainsaw, wr_think, void(entity thiswep, entity actor, .entity weaponentity, int fire))
METHOD(OverkillRocketPropelledChainsaw, wr_reload, void(entity thiswep, entity actor, .entity weaponentity))
{
- W_Reload(actor, weaponentity, WEP_CVAR_PRI(okrpc, ammo), SND_RELOAD);
+ W_Reload(actor, weaponentity, WEP_CVAR_PRI(okrpc, ammo), SND_RELOAD);
}
METHOD(OverkillRocketPropelledChainsaw, wr_suicidemessage, Notification(entity thiswep))
{
- if((w_deathtype & HITTYPE_BOUNCE) || (w_deathtype & HITTYPE_SPLASH))
- return WEAPON_OVERKILL_RPC_SUICIDE_SPLASH;
- else
- return WEAPON_OVERKILL_RPC_SUICIDE_DIRECT;
+ if((w_deathtype & HITTYPE_BOUNCE) || (w_deathtype & HITTYPE_SPLASH))
+ return WEAPON_OVERKILL_RPC_SUICIDE_SPLASH;
+ else
+ return WEAPON_OVERKILL_RPC_SUICIDE_DIRECT;
}
METHOD(OverkillRocketPropelledChainsaw, wr_killmessage, Notification(entity thiswep))
{
- if(w_deathtype & HITTYPE_SECONDARY)
- return WEAPON_BLASTER_MURDER;
- else if((w_deathtype & HITTYPE_BOUNCE) || (w_deathtype & HITTYPE_SPLASH))
- return WEAPON_OVERKILL_RPC_MURDER_SPLASH;
- else
- return WEAPON_OVERKILL_RPC_MURDER_DIRECT;
+ if(w_deathtype & HITTYPE_SECONDARY)
+ return WEAPON_BLASTER_MURDER;
+ else if((w_deathtype & HITTYPE_BOUNCE) || (w_deathtype & HITTYPE_SPLASH))
+ return WEAPON_OVERKILL_RPC_MURDER_SPLASH;
+ else
+ return WEAPON_OVERKILL_RPC_MURDER_DIRECT;
}
#endif
METHOD(OverkillRocketPropelledChainsaw, wr_impacteffect, void(entity thiswep, entity actor))
{
- vector org2 = w_org + w_backoff * 2;
- pointparticles(EFFECT_ROCKET_EXPLODE, org2, '0 0 0', 1);
- if(!w_issilent)
- sound(actor, CH_SHOTS, SND_ROCKET_IMPACT, VOL_BASE, ATTEN_NORM);
+ vector org2 = w_org + w_backoff * 2;
+ pointparticles(EFFECT_ROCKET_EXPLODE, org2, '0 0 0', 1);
+ if(!w_issilent)
+ sound(actor, CH_SHOTS, SND_ROCKET_IMPACT, VOL_BASE, ATTEN_NORM);
}
#endif
P(class, prefix, speed, float, SEC) \
P(class, prefix, spread, float, SEC) \
P(class, prefix, reload_ammo, float, NONE) \
- P(class, prefix, reload_time, float, NONE) \
- P(class, prefix, switchdelay_drop, float, NONE) \
- P(class, prefix, switchdelay_raise, float, NONE) \
- P(class, prefix, weaponreplace, string, NONE) \
- P(class, prefix, weaponstartoverride, float, NONE) \
- P(class, prefix, weaponstart, float, NONE) \
- P(class, prefix, weaponthrowable, float, NONE) \
- END()
- W_PROPS(X, OverkillRocketPropelledChainsaw, okrpc)
+ P(class, prefix, reload_time, float, NONE) \
+ P(class, prefix, switchdelay_drop, float, NONE) \
+ P(class, prefix, switchdelay_raise, float, NONE) \
+ P(class, prefix, weaponreplace, string, NONE) \
+ P(class, prefix, weaponstartoverride, float, NONE) \
+ P(class, prefix, weaponstart, float, NONE) \
+ P(class, prefix, weaponthrowable, float, NONE) \
+ END()
+ W_PROPS(X, OverkillRocketPropelledChainsaw, okrpc)
#undef X
ENDCLASS(OverkillRocketPropelledChainsaw)