From 16c8f821cfc2ee4a1d617053782543d6a6946da1 Mon Sep 17 00:00:00 2001 From: Martin Taibr Date: Mon, 2 Jul 2018 12:31:16 +0200 Subject: [PATCH] new MG bullet effect (TODO update the file with tons of macros to match) --- effectinfo.txt | 26 ++++++++++++++++------- qcsrc/common/weapons/weapon/machinegun.qc | 8 +++---- 2 files changed, 22 insertions(+), 12 deletions(-) diff --git a/effectinfo.txt b/effectinfo.txt index 128169c50..953526145 100644 --- a/effectinfo.txt +++ b/effectinfo.txt @@ -2751,14 +2751,24 @@ effect flac_explode velocityjitter 256 256 256 velocityoffset 0 0 80 effect tr_bullet - type spark - alpha 256 256 2560 - color 0xff8960 0xff8533 - size 4 4 - stretchfactor 0.200000 - tex 70 70 - trailspacing 750 - velocitymultiplier 3 + type beam + alpha 500 600 10000 + color 0xf03000 0xff6010 + countabsolute 1 + sizeincrease -3 + size 0.6 0.8 + tex 200 200 +effect tr_bullet + type smoke + airfriction -4 + alpha 256 256 350 + color 0x202020 0x404040 + notunderwater + sizeincrease 0.400000 + size 1 2 + tex 0 8 + trailspacing 16 + velocityjitter 4 4 4 effect smoking_smallemitter type alphastatic airfriction -1 diff --git a/qcsrc/common/weapons/weapon/machinegun.qc b/qcsrc/common/weapons/weapon/machinegun.qc index bc51577c9..dec35d03e 100644 --- a/qcsrc/common/weapons/weapon/machinegun.qc +++ b/qcsrc/common/weapons/weapon/machinegun.qc @@ -61,9 +61,9 @@ void W_MachineGun_Attack(Weapon thiswep, int deathtype, entity actor, .entity we ATTACK_FINISHED(actor, slot) = time + WEP_CVAR(machinegun, first_refire) * W_WeaponRateFactor(actor); if(actor.(weaponentity).misc_bulletcounter == 1) - fireBullet(actor, weaponentity, w_shotorg, w_shotdir, WEP_CVAR(machinegun, first_spread), WEP_CVAR(machinegun, solidpenetration), WEP_CVAR(machinegun, first_damage), WEP_CVAR(machinegun, first_force), deathtype, EFFECT_RIFLE_WEAK); + fireBullet(actor, weaponentity, w_shotorg, w_shotdir, WEP_CVAR(machinegun, first_spread), WEP_CVAR(machinegun, solidpenetration), WEP_CVAR(machinegun, first_damage), WEP_CVAR(machinegun, first_force), deathtype, EFFECT_BULLET); else - fireBullet(actor, weaponentity, w_shotorg, w_shotdir, WEP_CVAR(machinegun, sustained_spread), WEP_CVAR(machinegun, solidpenetration), WEP_CVAR(machinegun, sustained_damage), WEP_CVAR(machinegun, sustained_force), deathtype, EFFECT_RIFLE_WEAK); + fireBullet(actor, weaponentity, w_shotorg, w_shotdir, WEP_CVAR(machinegun, sustained_spread), WEP_CVAR(machinegun, solidpenetration), WEP_CVAR(machinegun, sustained_damage), WEP_CVAR(machinegun, sustained_force), deathtype, EFFECT_BULLET); Send_Effect(EFFECT_MACHINEGUN_MUZZLEFLASH, w_shotorg, w_shotdir * 1000, 1); @@ -137,7 +137,7 @@ void W_MachineGun_Attack_Auto(Weapon thiswep, entity actor, .entity weaponentity } machinegun_spread = bound(WEP_CVAR(machinegun, spread_min), WEP_CVAR(machinegun, spread_min) + (WEP_CVAR(machinegun, spread_add) * actor.(weaponentity).misc_bulletcounter), WEP_CVAR(machinegun, spread_max)); - fireBullet(actor, weaponentity, w_shotorg, w_shotdir, machinegun_spread, WEP_CVAR(machinegun, solidpenetration), WEP_CVAR(machinegun, sustained_damage), WEP_CVAR(machinegun, sustained_force), WEP_MACHINEGUN.m_id, EFFECT_RIFLE_WEAK); + fireBullet(actor, weaponentity, w_shotorg, w_shotdir, machinegun_spread, WEP_CVAR(machinegun, solidpenetration), WEP_CVAR(machinegun, sustained_damage), WEP_CVAR(machinegun, sustained_force), WEP_MACHINEGUN.m_id, EFFECT_BULLET); actor.(weaponentity).misc_bulletcounter = actor.(weaponentity).misc_bulletcounter + 1; @@ -166,7 +166,7 @@ void W_MachineGun_Attack_Burst(Weapon thiswep, entity actor, .entity weaponentit actor.punchangle_y = random() - 0.5; } - fireBullet(actor, weaponentity, w_shotorg, w_shotdir, WEP_CVAR(machinegun, burst_speed), WEP_CVAR(machinegun, solidpenetration), WEP_CVAR(machinegun, sustained_damage), WEP_CVAR(machinegun, sustained_force), WEP_MACHINEGUN.m_id, EFFECT_RIFLE_WEAK); + fireBullet(actor, weaponentity, w_shotorg, w_shotdir, WEP_CVAR(machinegun, burst_speed), WEP_CVAR(machinegun, solidpenetration), WEP_CVAR(machinegun, sustained_damage), WEP_CVAR(machinegun, sustained_force), WEP_MACHINEGUN.m_id, EFFECT_BULLET); Send_Effect(EFFECT_MACHINEGUN_MUZZLEFLASH, w_shotorg, w_shotdir * 1000, 1); -- 2.39.2