vector v;
v = WarpZone_UnTransformOrigin(WarpZone_trace_transform, trace_endpos);
WriteHeader(MSG_BROADCAST, TE_CSQC_VORTEXBEAMPARTICLE);
- WriteCoord(MSG_BROADCAST, w_shotorg.x);
- WriteCoord(MSG_BROADCAST, w_shotorg.y);
- WriteCoord(MSG_BROADCAST, w_shotorg.z);
- WriteCoord(MSG_BROADCAST, v.x);
- WriteCoord(MSG_BROADCAST, v.y);
- WriteCoord(MSG_BROADCAST, v.z);
+ WriteVector(MSG_BROADCAST, w_shotorg);
+ WriteVector(MSG_BROADCAST, v);
WriteByte(MSG_BROADCAST, bound(0, 255 * charge, 255));
}
#elif defined(CSQC)
NET_HANDLE(TE_CSQC_VORTEXBEAMPARTICLE, bool isNew)
{
- vector shotorg, endpos;
float charge;
- shotorg.x = ReadCoord(); shotorg.y = ReadCoord(); shotorg.z = ReadCoord();
- endpos.x = ReadCoord(); endpos.y = ReadCoord(); endpos.z = ReadCoord();
+ vector shotorg = ReadVector();
+ vector endpos = ReadVector();
charge = ReadByte() / 255.0;
pointparticles(EFFECT_VORTEX_MUZZLEFLASH, shotorg, normalize(endpos - shotorg) * 1000, 1);
myforcehalflife = WEP_CVAR_BOTH(vortex, !issecondary, damagefalloff_forcehalflife);
myammo = WEP_CVAR_BOTH(vortex, !issecondary, ammo);
+ float dtype = WEP_VORTEX.m_id;
+ if(WEP_CVAR_BOTH(vortex, !issecondary, armorpierce))
+ dtype |= HITTYPE_ARMORPIERCE;
+
float flying;
flying = IsFlying(actor); // do this BEFORE to make the trace values from FireRailgunBullet last
mydmg *= charge;
myforce *= charge;
- W_SetupShot(actor, weaponentity, true, 5, SND_NEXFIRE, CH_WEAPON_A, mydmg, WEP_VORTEX.m_id);
+ W_SetupShot(actor, weaponentity, true, 5, SND_NEXFIRE, CH_WEAPON_A, mydmg, dtype);
if(charge > WEP_CVAR(vortex, charge_animlimit) && WEP_CVAR(vortex, charge_animlimit)) // if the Vortex is overcharged, we play an extra sound
{
sound(actor, CH_WEAPON_B, SND_NEXCHARGE, VOL_BASE * (charge - 0.5 * WEP_CVAR(vortex, charge_animlimit)) / (1 - 0.5 * WEP_CVAR(vortex, charge_animlimit)), ATTN_NORM);
yoda = 0;
damage_goodhits = 0;
- FireRailgunBullet(actor, weaponentity, w_shotorg, w_shotorg + w_shotdir * max_shot_distance, mydmg, myforce, mymindist, mymaxdist, myhalflife, myforcehalflife, WEP_VORTEX.m_id);
+ FireRailgunBullet(actor, weaponentity, w_shotorg, w_shotorg + w_shotdir * max_shot_distance, mydmg, myforce, mymindist, mymaxdist, myhalflife, myforcehalflife, dtype);
if(yoda && flying)
Send_Notification(NOTIF_ONE, actor, MSG_ANNCE, ANNCE_ACHIEVEMENT_YODA);