// enable to debug melee range
//#define SHOTGUN_MELEEDEBUG
-METHOD(Shotgun, m_spawnfunc_hookreplace, Weapon(Shotgun this, entity e))
-{
- if (autocvar_sv_q3acompat_machineshotgunswap && !Item_IsLoot(e))
- {
- return WEP_MACHINEGUN;
- }
- return this;
-}
-
void W_Shotgun_Attack(Weapon thiswep, entity actor, .entity weaponentity, float isprimary, float ammocount, float damage, float bullets, float spread, float solidpenetration, float force, entity bullet_trail_effect)
{
W_DecreaseAmmo(thiswep, actor, ammocount, weaponentity);
for(int sc = 0;sc < bullets;sc = sc + 1)
fireBullet_antilag(actor, weaponentity, w_shotorg, w_shotdir, spread, solidpenetration, damage, force, thiswep.m_id, bullet_trail_effect, false);
-
+
if(lag && bullets > 0)
antilag_restore_all(actor);
// SG -> MG || SG
SPAWNFUNC_ITEM_COND(ammo_shells, autocvar_sv_q3acompat_machineshotgunswap, ITEM_Bullets, ITEM_Shells)
+SPAWNFUNC_WEAPON_COND(weapon_shotgun, autocvar_sv_q3acompat_machineshotgunswap, WEP_MACHINEGUN, WEP_SHOTGUN)
// MG -> SG || MG
SPAWNFUNC_ITEM_COND(ammo_bullets, autocvar_sv_q3acompat_machineshotgunswap, ITEM_Shells, ITEM_Bullets)