void lgbeam_think()
{
vector endpos;
+ float oldsolid;
+
self.owner.prevlgfire = time;
if (self.owner.weaponentity.state != WS_INUSE || (self.owner.ammo_cells <= 0 && !(self.owner.items & IT_UNLIMITED_WEAPON_AMMO)) || self != self.owner.lgbeam || self.owner.deadflag != DEAD_NO || !self.owner.BUTTON_ATCK)
{
vecs = debug_shotorg;
org = self.owner.origin + self.owner.view_ofs + v_forward * vecs_x + v_right * -vecs_y + v_up * vecs_z;
+ oldsolid = self.owner.dphitcontentsmask;
+ self.owner.dphitcontentsmask = DPCONTENTS_SOLID | DPCONTENTS_BODY | DPCONTENTS_CORPSE;
+
WarpZone_traceline_antilag(self.owner, self.owner.origin + self.owner.view_ofs, self.owner.origin + self.owner.view_ofs + angle * cvar("g_balance_electro_primary_range"), MOVE_NORMAL, self.owner, ANTILAG_LATENCY(self.owner));
endpos = WarpZone_UnTransformOrigin(WarpZone_trace_transform, trace_endpos);
- WarpZone_traceline_antilag(self.owner, org, endpos, MOVE_NORMAL, self.owner, ANTILAG_LATENCY(self.owner));
+ WarpZone_traceline_antilag(self.owner, org, endpos + 4 * normalize(endpos - org), MOVE_NORMAL, self.owner, ANTILAG_LATENCY(self.owner));
+
+ self.owner.dphitcontentsmask = oldsolid;
if not(self.owner.items & IT_UNLIMITED_WEAPON_AMMO)
self.owner.ammo_cells = max(0, self.owner.ammo_cells - cvar("g_balance_electro_primary_ammo") * frametime);
void gauntletbeam_think()
{
vector endpos;
+ float oldsolid;
+
float damage, myforce, myradius;
if(self.cnt)
{
vecs = debug_shotorg;
org = self.owner.origin + self.owner.view_ofs + v_forward * vecs_x + v_right * -vecs_y + v_up * vecs_z;
+ oldsolid = self.owner.dphitcontentsmask;
+ self.owner.dphitcontentsmask = DPCONTENTS_SOLID | DPCONTENTS_BODY | DPCONTENTS_CORPSE;
+
WarpZone_traceline_antilag(self.owner, self.owner.origin + self.owner.view_ofs, self.owner.origin + self.owner.view_ofs + angle * myradius, MOVE_NORMAL, self.owner, ANTILAG_LATENCY(self.owner));
endpos = WarpZone_UnTransformOrigin(WarpZone_trace_transform, trace_endpos);
- WarpZone_traceline_antilag(self.owner, org, endpos, MOVE_NORMAL, self.owner, ANTILAG_LATENCY(self.owner));
+ WarpZone_traceline_antilag(self.owner, org, endpos + 4 * normalize(endpos - org), MOVE_NORMAL, self.owner, ANTILAG_LATENCY(self.owner));
+
+ self.owner.dphitcontentsmask = oldsolid;
// apply the damage
if(trace_fraction < 1)