X-Git-Url: https://git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fcommon%2Fweapons%2Fweapon%2Frifle.qc;h=aa4a980623a4168791f700cdd21b523967bc1796;hb=744778dcd1723896ffbe7e3b43e2645f875c37f1;hp=9f4bdc15e63d1ba3c6ef9e14177ce084952f97d7;hpb=8782d4625fb1b3e338da59e947a05e0dbcf4a493;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/common/weapons/weapon/rifle.qc b/qcsrc/common/weapons/weapon/rifle.qc index 9f4bdc15e..aa4a98062 100644 --- a/qcsrc/common/weapons/weapon/rifle.qc +++ b/qcsrc/common/weapons/weapon/rifle.qc @@ -22,10 +22,10 @@ void W_Rifle_FireBullet(Weapon thiswep, .entity weaponentity, float pSpread, flo fireBullet(actor, weaponentity, w_shotorg, w_shotdir, pSpread, pSolidPenetration, pDamage, pHeadshotDamage, pForce, deathtype, (pTracer ? EFFECT_RIFLE : EFFECT_RIFLE_WEAK)); if(autocvar_g_casings >= 2) - { - makevectors(actor.v_angle); // for some reason, this is lost - SpawnCasing(((random() * 50 + 50) * v_right) - (v_forward * (random() * 25 + 25)) - ((random() * 5 - 70) * v_up), 2, vectoangles(v_forward),'0 250 0', 100, 3, actor, weaponentity); - } + { + makevectors(actor.v_angle); // for some reason, this is lost + SpawnCasing(((random() * 50 + 50) * v_right) - (v_forward * (random() * 25 + 25)) - ((random() * 5 - 70) * v_up), vectoangles(v_forward), 3, actor, weaponentity); + } } void W_Rifle_Attack(Weapon thiswep, entity actor, .entity weaponentity) @@ -94,7 +94,7 @@ METHOD(Rifle, wr_aim, void(entity thiswep, entity actor, .entity weaponentity)) actor.bot_secondary_riflemooth = 0; if(actor.bot_secondary_riflemooth == 0) { - if(bot_aim(actor, weaponentity, 1000000, 0, 0.001, false)) + if(bot_aim(actor, weaponentity, 1000000, 0, 0.001, false, true)) { PHYS_INPUT_BUTTON_ATCK(actor) = true; if(random() < 0.01) actor.bot_secondary_riflemooth = 1; @@ -102,7 +102,7 @@ METHOD(Rifle, wr_aim, void(entity thiswep, entity actor, .entity weaponentity)) } else { - if(bot_aim(actor, weaponentity, 1000000, 0, 0.001, false)) + if(bot_aim(actor, weaponentity, 1000000, 0, 0.001, false, true)) { PHYS_INPUT_BUTTON_ATCK2(actor) = true; if(random() < 0.03) actor.bot_secondary_riflemooth = 0;