]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Merge branch 'master' into martin-t/bullet-trails
authorMartin Taibr <taibr.martin@gmail.com>
Wed, 26 Sep 2018 06:43:27 +0000 (08:43 +0200)
committerMartin Taibr <taibr.martin@gmail.com>
Wed, 26 Sep 2018 06:43:27 +0000 (08:43 +0200)
14 files changed:
effectinfo.txt
qcsrc/common/effects/all.inc
qcsrc/common/effects/effectinfo.inc
qcsrc/common/mutators/mutator/overkill/okhmg.qc
qcsrc/common/mutators/mutator/overkill/okmachinegun.qc
qcsrc/common/mutators/mutator/overkill/okshotgun.qc
qcsrc/common/turrets/turret/machinegun_weapon.qc
qcsrc/common/turrets/turret/walker_weapon.qc
qcsrc/common/vehicles/vehicle/spiderbot.qc
qcsrc/common/weapons/weapon/machinegun.qc
qcsrc/common/weapons/weapon/rifle.qc
qcsrc/common/weapons/weapon/shotgun.qc
qcsrc/server/weapons/tracing.qc
qcsrc/server/weapons/tracing.qh

index 128169c502911d760c7de4707850887c805f6284..c07774a05b99473c12eb20e5f9de754fc87f895c 100644 (file)
@@ -2751,14 +2751,36 @@ 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 tr_bullet
+       type bubble
+       alpha 256 256 128
+       bounce 1.500000
+       color 0x404040 0x808080
+       gravity -0.125000
+       liquidfriction 4
+       size 0.5 0.6
+       tex 62 62
+       trailspacing 16
+       underwater
+       velocityjitter 16 16 16
 effect smoking_smallemitter
        type alphastatic
        airfriction -1
@@ -8262,3 +8284,34 @@ effect arc_bolt_explode
        tex 40 40
        velocityjitter 224 224 224
        velocityoffset 0 0 80
+effect tr_bullet_weak
+       type beam
+       alpha 75 100 3000
+       color 0xf03000 0xff6010
+       countabsolute 1
+       sizeincrease -3
+       size 0.6 0.8
+       tex 200 200
+effect tr_bullet_weak
+       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 tr_bullet_weak
+       type bubble
+       alpha 256 256 128
+       bounce 1.500000
+       color 0x404040 0x808080
+       gravity -0.125000
+       liquidfriction 4
+       size 0.5 0.6
+       tex 62 62
+       trailspacing 32
+       underwater
+       velocityjitter 16 16 16
index 3b534ab781d0f7d8a4614a4534fe4f208a28899d..882e715cde3bf3673045499e643547a01a2d44bf 100644 (file)
@@ -229,6 +229,7 @@ EFFECT(0, SMOKING,                  "smoking")
 EFFECT(0, SMOKE_RING,               "smoke_ring")
 EFFECT(0, JUMPPAD,                  "jumppad_activate")
 EFFECT(1, BULLET,                   "tr_bullet")
+EFFECT(1, BULLET_WEAK,              "tr_bullet_weak")
 EFFECT(0, EF_FLAME,                 "EF_FLAME")
 EFFECT(0, EF_STARDUST,              "EF_STARDUST")
 EFFECT(0, TE_EXPLOSION,             "TE_EXPLOSION")
index b659e8a8517a83755718d93ea06c03c9a9989db8..d3c184fab743f78878f3c4d01fc5a42c34ea17a5 100644 (file)
@@ -1,3 +1,12 @@
+// docs: https://www.quakewiki.net/darkplaces-wiki/effectinfo-scripting-reference/
+// use `cl_particles_reloadeffects` to reload effects without restarting engine
+// use `chase_active 1` and `cl_lockview 1` to see effects from different perspectives
+// `dumpeffectinfo` currently doesn't work so edit effectinfo.txt manually, just try to keep the files in sync
+
+// `tex` are indices into particles/particlefont.tga (see particles/particlefont-template.tga for numbers)
+// the first index is inclusive, second exclusive (so `tex 0 8` will use images 0 though 7)
+// unless they're equal (`tex 69 69` is the same as `tex 69 70`)
+
 // item respawn effect
 DEF(TE_WIZSPIKE);
 // flare particle and light
@@ -4410,20 +4419,50 @@ SUB(flac_explode) {
 
 // bullet trail (somewhat like a tracer)
 DEF(tr_bullet);
+SUB(tr_bullet) {
+       MY(alpha) = '500 600 10000';
+       MY(color_min) = "0xf03000";
+       MY(color_max) = "0xff6010";
+       MY(countabsolute) = 1;
+       MY(sizeincrease) = -3;
+       MY(size_min) = 0.6;
+       MY(size_max) = 0.8;
+       my(tex_min) = 200;
+       my(tex_max) = 200;
+       MY(type) = "beam";
+}
+SUB(tr_bullet) {
+       MY(airfriction) = -4;
+       MY(alpha) = '256 256 350';
+       MY(color_min) = "0x202020";
+       MY(color_max) = "0x404040";
+       MY(notunderwater) = true;
+       MY(sizeincrease) = 0.4;
+       MY(size_min) = 1;
+       MY(size_max) = 2;
+       MY(tex_min) = 0;
+       MY(tex_max) = 8;
+       MY(trailspacing) = 16;
+       MY(type) = "smoke";
+       MY(velocityjitter) = '4 4 4';
+}
 SUB(tr_bullet) {
        MY(alpha_min) = 256;
        MY(alpha_max) = 256;
-       MY(alpha_fade) = 2560;
-       MY(color_min) = "0xff8960";
-       MY(color_max) = "0xff8533";
-       MY(size_min) = 4;
-       MY(size_max) = 4;
-       MY(stretchfactor) = 0.200000;
-       MY(tex_min) = 70;
-       MY(tex_max) = 70;
-       MY(trailspacing) = 750;
-       MY(type) = "spark";
-       MY(velocitymultiplier) = 3;
+       MY(alpha_fade) = 128;
+       MY(bounce) = 1.500000;
+       MY(color_min) = "0x404040";
+       MY(color_max) = "0x808080";
+       MY(gravity) = -0.125000;
+       MY(liquidfriction) = 4;
+       MY(size_min) = 0.5;
+       MY(size_max) = 0.6;
+       MY(tex_min) = 62;
+       MY(tex_max) = 62;
+       MY(trailspacing) = 16;
+       MY(type) = "bubble";
+       MY(underwater) = true;
+       MY(velocityjitter) = '16.0 16.0 16.0';
 }
 
 // smoke emitter for small pipes
@@ -8889,3 +8928,51 @@ SUB(arc_bolt_explode) {
        MY(velocityjitter) = '224.0 224.0 224.0';
        MY(velocityoffset) = '0.0 0.0 80.0';
 }
+
+// weak bullet trail (somewhat like a tracer)
+DEF(tr_bullet_weak);
+SUB(tr_bullet_weak) {
+       MY(alpha) = '75 100 3000';
+       MY(color_min) = "0xf03000";
+       MY(color_max) = "0xff6010";
+       MY(countabsolute) = 1;
+       MY(sizeincrease) = -3;
+       MY(size_min) = 0.6;
+       MY(size_max) = 0.8;
+       my(tex_min) = 200;
+       my(tex_max) = 200;
+       MY(type) = "beam";
+}
+SUB(tr_bullet_weak) {
+       MY(airfriction) = -4;
+       MY(alpha) = '256 256 350';
+       MY(color_min) = "0x202020";
+       MY(color_max) = "0x404040";
+       MY(notunderwater) = true;
+       MY(sizeincrease) = 0.4;
+       MY(size_min) = 1;
+       MY(size_max) = 2;
+       MY(tex_min) = 0;
+       MY(tex_max) = 8;
+       MY(trailspacing) = 16;
+       MY(type) = "smoke";
+       MY(velocityjitter) = '4 4 4';
+}
+SUB(tr_bullet_weak) {
+       MY(alpha_min) = 256;
+       MY(alpha_max) = 256;
+       MY(alpha_fade) = 128;
+       MY(bounce) = 1.500000;
+       MY(color_min) = "0x404040";
+       MY(color_max) = "0x808080";
+       MY(gravity) = -0.125000;
+       MY(liquidfriction) = 4;
+       MY(size_min) = 0.5;
+       MY(size_max) = 0.6;
+       MY(tex_min) = 62;
+       MY(tex_max) = 62;
+       MY(trailspacing) = 32;
+       MY(type) = "bubble";
+       MY(underwater) = true;
+       MY(velocityjitter) = '16.0 16.0 16.0';
+}
index d278ca9d444b052f4a2a9a3151321be48b78460f..003cd3abc6c258378eaf04be3eb2caa62cbf6b13 100644 (file)
@@ -36,7 +36,7 @@ void W_OverkillHeavyMachineGun_Attack_Auto(Weapon thiswep, entity actor, .entity
        }
 
        float okhmg_spread = bound(WEP_CVAR_PRI(okhmg, spread_min), WEP_CVAR_PRI(okhmg, spread_min) + (WEP_CVAR_PRI(okhmg, spread_add) * actor.(weaponentity).misc_bulletcounter), WEP_CVAR_PRI(okhmg, spread_max));
-       fireBullet(actor, weaponentity, w_shotorg, w_shotdir, okhmg_spread, WEP_CVAR_PRI(okhmg, solidpenetration), WEP_CVAR_PRI(okhmg, damage), WEP_CVAR_PRI(okhmg, force), WEP_OVERKILL_HMG.m_id, 0);
+       fireBullet(actor, weaponentity, w_shotorg, w_shotdir, okhmg_spread, WEP_CVAR_PRI(okhmg, solidpenetration), WEP_CVAR_PRI(okhmg, damage), WEP_CVAR_PRI(okhmg, force), WEP_OVERKILL_HMG.m_id, EFFECT_RIFLE);
 
        actor.(weaponentity).misc_bulletcounter = actor.(weaponentity).misc_bulletcounter + 1;
 
index 63c1e245b4ad1121cfbf593ac4e563da67c6b2b0..27502a75985dc28b90eb529ba3b787aec0fa3bdf 100644 (file)
@@ -30,7 +30,7 @@ void W_OverkillMachineGun_Attack_Auto(Weapon thiswep, entity actor, .entity weap
        }
 
        okmachinegun_spread = bound(WEP_CVAR_PRI(okmachinegun, spread_min), WEP_CVAR_PRI(okmachinegun, spread_min) + (WEP_CVAR_PRI(okmachinegun, spread_add) * actor.(weaponentity).misc_bulletcounter), WEP_CVAR_PRI(okmachinegun, spread_max));
-       fireBullet(actor, weaponentity, w_shotorg, w_shotdir, okmachinegun_spread, WEP_CVAR_PRI(okmachinegun, solidpenetration), WEP_CVAR_PRI(okmachinegun, damage), WEP_CVAR_PRI(okmachinegun, force), WEP_OVERKILL_MACHINEGUN.m_id, 0);
+       fireBullet(actor, weaponentity, w_shotorg, w_shotdir, okmachinegun_spread, WEP_CVAR_PRI(okmachinegun, solidpenetration), WEP_CVAR_PRI(okmachinegun, damage), WEP_CVAR_PRI(okmachinegun, force), WEP_OVERKILL_MACHINEGUN.m_id, EFFECT_RIFLE);
 
        actor.(weaponentity).misc_bulletcounter = actor.(weaponentity).misc_bulletcounter + 1;
 
@@ -153,4 +153,3 @@ METHOD(OverkillMachineGun, wr_impacteffect, void(entity thiswep, entity actor))
 }
 
 #endif
-
index d8c79e3f2e1e20fae5f4048ca6d35e3b58b0b696..2461ba0cb09dd1098019bd1929a08fccbf6accbb 100644 (file)
@@ -55,7 +55,8 @@ METHOD(OverkillShotgun, wr_think, void(entity thiswep, entity actor, .entity wea
                        WEP_CVAR_PRI(okshotgun, bullets),
                        WEP_CVAR_PRI(okshotgun, spread),
                        WEP_CVAR_PRI(okshotgun, solidpenetration),
-                       WEP_CVAR_PRI(okshotgun, force));
+                       WEP_CVAR_PRI(okshotgun, force),
+                       EFFECT_RIFLE_WEAK);
                weapon_thinkf(actor, weaponentity, WFRAME_FIRE1, WEP_CVAR_PRI(okshotgun, animtime), w_ready);
                return;
        }
index 619d7a9072d9a1e127e8e4698caa0c99bd8fc6f2..a56e7de3833a6fe4d997cda5fa4081de332c95c8 100644 (file)
@@ -17,7 +17,7 @@ METHOD(MachineGunTurretAttack, wr_think, void(entity thiswep, entity actor, .ent
             actor.tur_head = actor;
             weapon_thinkf(actor, weaponentity, WFRAME_FIRE1, 0, w_ready);
         }
-        fireBullet (actor, weaponentity, actor.tur_shotorg, actor.tur_shotdir_updated, actor.shot_spread, 0, actor.shot_dmg, actor.shot_force, DEATH_TURRET_MACHINEGUN.m_id, 0);
+        fireBullet(actor, weaponentity, actor.tur_shotorg, actor.tur_shotdir_updated, actor.shot_spread, 0, actor.shot_dmg, actor.shot_force, DEATH_TURRET_MACHINEGUN.m_id, EFFECT_BULLET);
         W_MachineGun_MuzzleFlash(actor, weaponentity);
         setattachment(actor.(weaponentity).muzzle_flash, actor.tur_head, "tag_fire");
     }
index d81b738ed4510b8565584752f76c50c785765471..bbe59aeac90aeca4980be687fb8257eb60ae545e 100644 (file)
@@ -16,7 +16,7 @@ METHOD(WalkerTurretAttack, wr_think, void(entity thiswep, entity actor, .entity
             weapon_thinkf(actor, weaponentity, WFRAME_FIRE1, WEP_CVAR_PRI(electro, animtime), w_ready);
         }
         sound (actor, CH_WEAPON_A, SND_UZI_FIRE, VOL_BASE, ATTEN_NORM);
-        fireBullet (actor, weaponentity, actor.tur_shotorg, actor.tur_shotdir_updated, actor.shot_spread, 0, actor.shot_dmg, actor.shot_force, DEATH_TURRET_WALK_GUN.m_id, 0);
+        fireBullet(actor, weaponentity, actor.tur_shotorg, actor.tur_shotdir_updated, actor.shot_spread, 0, actor.shot_dmg, actor.shot_force, DEATH_TURRET_WALK_GUN.m_id, EFFECT_BULLET);
         Send_Effect(EFFECT_BLASTER_MUZZLEFLASH, actor.tur_shotorg, actor.tur_shotdir_updated * 1000, 1);
     }
 }
index 7352e1dbb4ec89674d4fd45c43534adf36e5fe28..323b025e0ebb5769d434004073a1fb04598176c5 100644 (file)
@@ -264,7 +264,7 @@ bool spiderbot_frame(entity this, float dt)
 
                        .entity weaponentity = weaponentities[0]; // TODO: unhardcode
                        fireBullet(this, weaponentity, v, v_forward, autocvar_g_vehicle_spiderbot_minigun_spread, autocvar_g_vehicle_spiderbot_minigun_solidpenetration,
-                               autocvar_g_vehicle_spiderbot_minigun_damage, autocvar_g_vehicle_spiderbot_minigun_force, DEATH_VH_SPID_MINIGUN.m_id, 0);
+                               autocvar_g_vehicle_spiderbot_minigun_damage, autocvar_g_vehicle_spiderbot_minigun_force, DEATH_VH_SPID_MINIGUN.m_id, EFFECT_BULLET);
 
                        sound (gun, CH_WEAPON_A, SND_UZI_FIRE, VOL_BASE, ATTEN_NORM);
                        //trailparticles(this, _particleeffectnum("spiderbot_minigun_trail"), v, trace_endpos);
index 6319dc36ae3ba04b6c5324e6bb6743e547b47e86..dec35d03ee94dc0c10b3931d52b50e9106abc7fe 100644 (file)
@@ -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, 0);
+               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, 0);
+               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, 0);
+       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, 0);
+       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);
 
index d6996042dc56967ebf02c29a946329ea40ce4323..b96fa35831c0095baf37399663968e4e75e7597f 100644 (file)
@@ -19,7 +19,7 @@ void W_Rifle_FireBullet(Weapon thiswep, .entity weaponentity, float pSpread, flo
        }
 
        for(i = 0; i < pShots; ++i)
-               fireBullet(actor, weaponentity, w_shotorg, w_shotdir, pSpread, pSolidPenetration, pDamage, pForce, deathtype, (pTracer ? EF_RED : EF_BLUE));
+               fireBullet(actor, weaponentity, w_shotorg, w_shotdir, pSpread, pSolidPenetration, pDamage, pForce, deathtype, (pTracer ? EFFECT_RIFLE : EFFECT_RIFLE_WEAK));
 
        if(autocvar_g_casings >= 2)
     {
index c31a32de22222153480d38d42a73d8d5c97cefe6..eea1165ff8954181bcb4ddfc986dc9470be77e24 100644 (file)
@@ -2,14 +2,13 @@
 
 #ifdef SVQC
 
-void W_Shotgun_Attack(Weapon thiswep, entity actor, .entity weaponentity, float isprimary, float ammocount, float damage, float bullets, float spread, float solidpenetration, float force)
+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);
 
        W_SetupShot(actor, weaponentity, true, 5, SND_SHOTGUN_FIRE, ((isprimary) ? CH_WEAPON_A : CH_WEAPON_SINGLE), damage * bullets, thiswep.m_id);
        for(int sc = 0;sc < bullets;sc = sc + 1)
-               fireBullet(actor, weaponentity, w_shotorg, w_shotdir, spread, solidpenetration, damage, force, thiswep.m_id, 0);
-
+               fireBullet(actor, weaponentity, w_shotorg, w_shotdir, spread, solidpenetration, damage, force, thiswep.m_id, bullet_trail_effect);
 
        Send_Effect(EFFECT_SHOTGUN_MUZZLEFLASH, w_shotorg, w_shotdir * 1000, ammocount);
 
@@ -159,7 +158,8 @@ void W_Shotgun_Attack3_Frame2(Weapon thiswep, entity actor, .entity weaponentity
                WEP_CVAR_PRI(shotgun, bullets),
                WEP_CVAR_PRI(shotgun, spread),
                WEP_CVAR_PRI(shotgun, solidpenetration),
-               WEP_CVAR_PRI(shotgun, force)); // actually is secondary, but we trick the last shot into playing full reload sound
+               WEP_CVAR_PRI(shotgun, force),
+               EFFECT_BULLET_WEAK); // actually is secondary, but we trick the last shot into playing full reload sound
        weapon_thinkf(actor, weaponentity, WFRAME_FIRE1, WEP_CVAR_SEC(shotgun, alt_animtime), w_ready);
 }
 void W_Shotgun_Attack3_Frame1(Weapon thiswep, entity actor, .entity weaponentity, int fire)
@@ -178,7 +178,8 @@ void W_Shotgun_Attack3_Frame1(Weapon thiswep, entity actor, .entity weaponentity
                WEP_CVAR_PRI(shotgun, bullets),
                WEP_CVAR_PRI(shotgun, spread),
                WEP_CVAR_PRI(shotgun, solidpenetration),
-               WEP_CVAR_PRI(shotgun, force));
+               WEP_CVAR_PRI(shotgun, force),
+               EFFECT_BULLET_WEAK);
        weapon_thinkf(actor, weaponentity, WFRAME_FIRE1, WEP_CVAR_SEC(shotgun, alt_animtime), W_Shotgun_Attack3_Frame2);
 }
 
@@ -215,7 +216,8 @@ METHOD(Shotgun, wr_think, void(entity thiswep, entity actor, .entity weaponentit
                                                WEP_CVAR_PRI(shotgun, bullets),
                                                WEP_CVAR_PRI(shotgun, spread),
                                                WEP_CVAR_PRI(shotgun, solidpenetration),
-                                               WEP_CVAR_PRI(shotgun, force));
+                                               WEP_CVAR_PRI(shotgun, force),
+                                               EFFECT_BULLET_WEAK);
                     actor.(weaponentity).shotgun_primarytime = time + WEP_CVAR_PRI(shotgun, refire) * W_WeaponRateFactor(actor);
                     weapon_thinkf(actor, weaponentity, WFRAME_FIRE1, WEP_CVAR_PRI(shotgun, animtime), w_ready);
                 }
@@ -233,7 +235,8 @@ METHOD(Shotgun, wr_think, void(entity thiswep, entity actor, .entity weaponentit
                                                WEP_CVAR_PRI(shotgun, bullets),
                                                WEP_CVAR_PRI(shotgun, spread),
                                                WEP_CVAR_PRI(shotgun, solidpenetration),
-                                               WEP_CVAR_PRI(shotgun, force));
+                                               WEP_CVAR_PRI(shotgun, force),
+                                               EFFECT_BULLET_WEAK);
                     actor.(weaponentity).shotgun_primarytime = time + WEP_CVAR_SEC(shotgun, alt_refire) * W_WeaponRateFactor(actor);
                     weapon_thinkf(actor, weaponentity, WFRAME_FIRE1, WEP_CVAR_SEC(shotgun, alt_animtime), W_Shotgun_Attack3_Frame1);
                 }
index b023180a138b1a9cca08235f950e8e81d633b17b..570d976db1d664505d01f6484fdaab7db7fa518d 100644 (file)
@@ -336,7 +336,7 @@ void fireBullet_trace_callback(vector start, vector hit, vector end)
        fireBullet_last_hit = NULL;
 }
 
-void fireBullet(entity this, .entity weaponentity, vector start, vector dir, float spread, float max_solid_penetration, float damage, float force, float dtype, int tracereffects)
+void fireBullet(entity this, .entity weaponentity, vector start, vector dir, float spread, float max_solid_penetration, float damage, float force, float dtype, entity tracer_effect)
 {
        vector  end;
 
@@ -344,16 +344,11 @@ void fireBullet(entity this, .entity weaponentity, vector start, vector dir, flo
        end = start + dir * max_shot_distance;
 
        fireBullet_last_hit = NULL;
+       fireBullet_trace_callback_eff = tracer_effect;
+
        float solid_penetration_left = 1;
        float total_damage = 0;
 
-       if(tracereffects & EF_RED)
-               fireBullet_trace_callback_eff = EFFECT_RIFLE;
-       else if(tracereffects & EF_BLUE)
-               fireBullet_trace_callback_eff = EFFECT_RIFLE_WEAK;
-       else
-               fireBullet_trace_callback_eff = EFFECT_BULLET;
-
        float lag = ((IS_REAL_CLIENT(this)) ? ANTILAG_LATENCY(this) : 0);
        if(lag < 0.001)
                lag = 0;
index 9224a970cf7b8cdfacf25edb582eb5b8adb75d54..9e39ecc350aef29a8fe369baaba53ff513aa4a49 100644 (file)
@@ -57,4 +57,4 @@ void FireRailgunBullet (entity this, .entity weaponentity, vector start, vector
 entity fireBullet_trace_callback_eff;
 entity fireBullet_last_hit;
 void fireBullet_trace_callback(vector start, vector hit, vector end);
-void fireBullet(entity this, .entity weaponentity, vector start, vector dir, float spread, float max_solid_penetration, float damage, float force, float dtype, int tracereffects);
+void fireBullet(entity this, .entity weaponentity, vector start, vector dir, float spread, float max_solid_penetration, float damage, float force, float dtype, entity tracer_effect);