X-Git-Url: http://git.xonotic.org/?a=blobdiff_plain;ds=sidebyside;f=qcsrc%2Fcommon%2Fweapons%2Fweapon%2Fshotgun.qc;h=f7c29a26e4e8cdd0b188c199d1ef80e771acd44c;hb=8e7d21da2c1a5f8701f3abde89c8dc4fa7da5100;hp=0fdb620b288bb2087d491f6144d2e541f5022044;hpb=2ccfbaf3d871db94af3195383a57ff738abaa07a;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/common/weapons/weapon/shotgun.qc b/qcsrc/common/weapons/weapon/shotgun.qc index 0fdb620b2..f7c29a26e 100644 --- a/qcsrc/common/weapons/weapon/shotgun.qc +++ b/qcsrc/common/weapons/weapon/shotgun.qc @@ -5,15 +5,6 @@ // 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); @@ -31,7 +22,7 @@ void W_Shotgun_Attack(Weapon thiswep, entity actor, .entity weaponentity, float if(lag && bullets > 0) antilag_restore_all(actor); - W_MuzzleFlash(actor, weaponentity, EFFECT_SHOTGUN_MUZZLEFLASH, w_shotorg, w_shotdir * 1000); + W_MuzzleFlash(thiswep, actor, weaponentity, w_shotorg, w_shotdir); // casing code if(autocvar_g_casings >= 1) @@ -40,15 +31,6 @@ void W_Shotgun_Attack(Weapon thiswep, entity actor, .entity weaponentity, float //for(int sc = 0;sc < WEP_CVAR_PRI(shotgun, ammo);sc = sc + 1) SpawnCasing(((random() * 50 + 50) * v_right) - (v_forward * (random() * 25 + 25)) - ((random() * 5 - 30) * v_up), 2, vectoangles(v_forward),'0 250 0', 100, 1, actor, weaponentity); } - - // muzzle flash for 1st person view - // TODO: handle on the client - entity flash = spawn(); - setmodel(flash, MDL_SHOTGUN_MUZZLEFLASH); // precision set below - setthink(flash, SUB_Remove); - flash.nextthink = time + 0.06; - flash.effects = EF_ADDITIVE | EF_FULLBRIGHT | EF_LOWPRECISION; - W_AttachToShotorg(actor, weaponentity, flash, '5 0 0'); } .float swing_prev;