if(lastdist)
{
R_BeginPolygon("", DRAWFLAG_NORMAL);
- R_PolygonVertex(lastorg, '0 0 0', '1 0 0', 1);
- R_PolygonVertex(neworg, '0 0 0', '1 0 0', 1);
- R_PolygonVertex(shotorg, '0 0 0', '1 0 0', 1);
+ R_PolygonVertex(lastorg, '0 0 0', '1 0 0', 0.5);
+ R_PolygonVertex(neworg, '0 0 0', '1 0 0', 0.5);
+ R_PolygonVertex(shotorg, '0 0 0', '1 0 0', 0.5);
R_EndPolygon();
}
.float swing_prev;
.entity swing_alreadyhit;
-void SendCSQCShockwaveParticle(float spread, vector endpos, entity transform)
+void SendCSQCShockwaveParticle(vector endpos, entity transform)
{
- WarpZone_UnTransformOrigin(transform, endpos);
+ WarpZone_TransformOrigin(transform, endpos);
WriteByte(MSG_BROADCAST, SVC_TEMPENTITY);
WriteByte(MSG_BROADCAST, TE_CSQC_SHOCKWAVEPARTICLE);
WriteCoord(MSG_BROADCAST, w_shotorg_x);
WriteCoord(MSG_BROADCAST, endpos_x);
WriteCoord(MSG_BROADCAST, endpos_y);
WriteCoord(MSG_BROADCAST, endpos_z);
- WriteByte(MSG_BROADCAST, bound(0, 255 * spread, 255));
+
+ makevectors(w_shotdir);
+ WriteByte(MSG_BROADCAST, bound(0, 255 * vlen(normalize((endpos + (v_up * autocvar_g_balance_laser_primary_spread_max)) - w_shotorg) - w_shotdir), 255));
}
void W_Laser_Touch()
RadiusDamageForSource(self, trace_endpos, '0 0 0', self, autocvar_g_balance_laser_primary_damage, autocvar_g_balance_laser_primary_edgedamage, autocvar_g_balance_laser_primary_jumpradius, world, self, TRUE, autocvar_g_balance_laser_primary_force, WEP_LASER, world);
// also do the firing effect now
- SendCSQCShockwaveParticle(autocvar_g_balance_laser_primary_spread, attack_hitpos, transform);
+ SendCSQCShockwaveParticle(attack_endpos, transform);
// did we hit a player directly?
if(aim_ent.takedamage)