X-Git-Url: http://de.git.xonotic.org/?p=xonotic%2Fxonotic-data.pk3dir.git;a=blobdiff_plain;f=qcsrc%2Fcommon%2Fweapons%2Fweapon%2Frifle.qc;h=1740c45d84c3fc5fe405dc03345c8e4bfd1147ad;hp=54784251281c0b488c4867123984548e060ae028;hb=9e8ea75b9aacffc5cfa18c8852c4dd9ffdbd3192;hpb=a9b85b9d5c653920b20c00e4bcec2fdca34d4484 diff --git a/qcsrc/common/weapons/weapon/rifle.qc b/qcsrc/common/weapons/weapon/rifle.qc index 5478425128..1740c45d84 100644 --- a/qcsrc/common/weapons/weapon/rifle.qc +++ b/qcsrc/common/weapons/weapon/rifle.qc @@ -1,9 +1,6 @@ #include "rifle.qh" #ifdef SVQC -spawnfunc(weapon_rifle) { weapon_defaultspawnfunc(this, WEP_RIFLE); } -spawnfunc(weapon_campingrifle) { spawnfunc_weapon_rifle(this); } -spawnfunc(weapon_sniperrifle) { spawnfunc_weapon_rifle(this); } void W_Rifle_FireBullet(Weapon thiswep, .entity weaponentity, float pSpread, float pDamage, float pForce, float pSolidPenetration, float pAmmo, int deathtype, float pTracer, float pShots, Sound pSound, entity actor) { @@ -11,7 +8,7 @@ void W_Rifle_FireBullet(Weapon thiswep, .entity weaponentity, float pSpread, flo W_DecreaseAmmo(thiswep, actor, pAmmo, weaponentity); - W_SetupShot(actor, weaponentity, true, 2, pSound, CH_WEAPON_A, pDamage * pShots); + W_SetupShot(actor, weaponentity, true, 2, pSound, CH_WEAPON_A, pDamage * pShots, deathtype); Send_Effect(EFFECT_RIFLE_MUZZLEFLASH, w_shotorg, w_shotdir * 2000, 1); @@ -226,5 +223,9 @@ METHOD(Rifle, wr_zoom, bool(entity thiswep, entity actor)) return false; } } +METHOD(Rifle, wr_zoomdir, bool(entity thiswep)) +{ + return button_attack2 && !WEP_CVAR(rifle, secondary); +} #endif