X-Git-Url: http://de.git.xonotic.org/?p=xonotic%2Fxonotic-data.pk3dir.git;a=blobdiff_plain;f=qcsrc%2Fcommon%2Fweapons%2Fweapon%2Fvortex.qc;h=b8963229710e23266cba03cb023c2a443773d6b1;hp=7e5da5c5ac0ca1195fece8cab027fd1da2ecb202;hb=e51ce3d45d2852ca793118fc73da9c25f789101f;hpb=9e8ea75b9aacffc5cfa18c8852c4dd9ffdbd3192 diff --git a/qcsrc/common/weapons/weapon/vortex.qc b/qcsrc/common/weapons/weapon/vortex.qc index 7e5da5c5a..b89632297 100644 --- a/qcsrc/common/weapons/weapon/vortex.qc +++ b/qcsrc/common/weapons/weapon/vortex.qc @@ -38,21 +38,16 @@ void SendCSQCVortexBeamParticle(float charge) { 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); @@ -110,6 +105,10 @@ void W_Vortex_Attack(Weapon thiswep, entity actor, .entity weaponentity, float i 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 @@ -125,7 +124,7 @@ void W_Vortex_Attack(Weapon thiswep, entity actor, .entity weaponentity, float i 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); @@ -133,7 +132,7 @@ void W_Vortex_Attack(Weapon thiswep, entity actor, .entity weaponentity, float i 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);