- wget -O data/maps/stormkeep.waypoints https://gitlab.com/xonotic/xonotic-maps.pk3dir/raw/master/maps/stormkeep.waypoints
- wget -O data/maps/stormkeep.waypoints.cache https://gitlab.com/xonotic/xonotic-maps.pk3dir/raw/master/maps/stormkeep.waypoints.cache
- make
- - EXPECT=e62d1a2375f0976ab12e2d980add29bd
+ - EXPECT=14643a645a99b8f855a6af279569d2a1
- HASH=$(${ENGINE} -noconfig -nohome +exec serverbench.cfg
| tee /dev/stderr
| grep '^:'
set g_balance_arc_bolt_damage 25
set g_balance_arc_bolt_damageforcescale 0
set g_balance_arc_bolt_edgedamage 12.5
-set g_balance_arc_bolt_force 120
+set g_balance_arc_bolt_force 200
set g_balance_arc_bolt_health 15
set g_balance_arc_bolt_lifetime 5
set g_balance_arc_bolt_radius 65
-set g_balance_arc_bolt_refire 0.16667
+set g_balance_arc_bolt_refire 0.033333
set g_balance_arc_bolt_speed 2300
set g_balance_arc_bolt_spread 0
set g_balance_arc_burst_ammo 15
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
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
return;
this.csqcmodel_predraw_run = framecount;
- if(!this.modelindex || this.model == "null")
+ if(!this.modelindex || this.model == "null" || this.alpha < 0)
{
this.drawmask = 0;
return;
else
this.drawmask = MASK_NORMAL;
- if(this.isplayermodel) // this checks if it's a player MODEL!
+ if(this.isplayermodel && this.drawmask) // this checks if it's a player MODEL!
{
CSQCPlayer_ModelAppearance_Apply(this, this.entnum == player_localnum + 1);
CSQCPlayer_LOD_Apply(this);
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")
+// 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
// 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
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';
+}
void button_wait(entity this);
void button_return(entity this);
+// in case button is deactivated by a relay_deactivate while it pressed down
+// set both fields to -1 in button_return!!
+.float wait_remaining;
+.float activation_time;
+
+void button_setactive(entity this, int astate)
+{
+ int oldstate = this.active;
+ if (astate == ACTIVE_TOGGLE)
+ {
+ if (this.active == ACTIVE_ACTIVE)
+ this.active = ACTIVE_NOT;
+ else
+ this.active = ACTIVE_ACTIVE;
+ }
+ else
+ this.active = astate;
+
+ if (this.active == ACTIVE_ACTIVE && oldstate == ACTIVE_NOT)
+ {
+ // button was deactivated while it was pressed
+ if (this.wait_remaining >= 0)
+ {
+ this.nextthink = this.wait_remaining + this.ltime;
+ setthink(this, button_return);
+ }
+ }
+ else if (this.active == ACTIVE_NOT && oldstate == ACTIVE_ACTIVE)
+ {
+ // check if button is in pressed state
+ if (this.activation_time >= 0)
+ {
+ this.wait_remaining = this.wait - (time - this.activation_time);
+ }
+ }
+}
+
void button_wait(entity this)
{
this.state = STATE_TOP;
void button_return(entity this)
{
+ if (this.active != ACTIVE_ACTIVE)
+ {
+ return;
+ }
this.state = STATE_DOWN;
SUB_CalcMove (this, this.pos1, TSPEED_LINEAR, this.speed, button_done);
this.frame = 0; // use normal textures
if (GetResourceAmount(this, RESOURCE_HEALTH))
this.takedamage = DAMAGE_YES; // can be shot again
+ this.wait_remaining = -1;
+ this.activation_time = -1;
}
if (this.state == STATE_UP || this.state == STATE_TOP)
return;
+ this.activation_time = time;
+
if (this.noise != "")
_sound (this, CH_TRIGGER, this.noise, VOL_BASE, ATTEN_NORM);
this.frame = 0; // use normal textures
this.state = STATE_BOTTOM;
this.velocity = '0 0 0';
+ this.wait_remaining = -1;
+ this.activation_time = -1;
+ this.active = ACTIVE_ACTIVE;
setthink(this, func_null);
this.nextthink = 0;
if (GetResourceAmount(this, RESOURCE_HEALTH))
void button_touch(entity this, entity toucher)
{
+ if (this.active != ACTIVE_ACTIVE)
+ return;
if (!toucher)
return;
if (!toucher.iscreature)
void button_damage(entity this, entity inflictor, entity attacker, float damage, int deathtype, .entity weaponentity, vector hitloc, vector force)
{
+ if (this.active != ACTIVE_ACTIVE)
+ return;
if(this.spawnflags & NOSPLASH)
if(!(DEATH_ISSPECIAL(deathtype)) && (deathtype & HITTYPE_SPLASH))
return;
if(this.noise != "")
precache_sound(this.noise);
- this.active = ACTIVE_ACTIVE;
this.draggable = drag_undraggable;
+ this.setactive = button_setactive;
+
this.pos1 = this.origin;
this.pos2 = this.pos1 + this.movedir*(fabs(this.movedir*this.size) - this.lip);
this.flags |= FL_NOTARGET;
}
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;
}
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;
}
#endif
-
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;
}
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");
}
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);
}
}
.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);
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);
}
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), thiswep.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), thiswep.m_id, EFFECT_BULLET);
actor.(weaponentity).misc_bulletcounter = actor.(weaponentity).misc_bulletcounter + 1;
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), thiswep.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), thiswep.m_id, EFFECT_BULLET);
Send_Effect(EFFECT_MACHINEGUN_MUZZLEFLASH, w_shotorg, w_shotdir * 1000, 1);
}
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)
{
#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);
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)
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);
}
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);
}
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);
}
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;
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;
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);
#include "../command/common.qh"
#include <server/mutators/_mod.qh>
#include "../round_handler.qh"
+#include <server/cheats.qh>
#include <server/resources.qh>
#include <common/t_items.qh>
#include <common/animdecide.qh>