X-Git-Url: http://de.git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fcommon%2Feffects%2Fall.qc;h=252f913379a02be272548bcf60162b693e82e4be;hb=26d2cece1d88a2fad9e0a2f8069c3924496698c1;hp=f43b25dcfbcac143bb7e29580befba124cc782c3;hpb=85a690d8a1e3eddfee959cea3dd42517484b07f4;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/common/effects/all.qc b/qcsrc/common/effects/all.qc index f43b25dcf..252f91337 100644 --- a/qcsrc/common/effects/all.qc +++ b/qcsrc/common/effects/all.qc @@ -11,18 +11,11 @@ NET_HANDLE(net_effect, bool isNew) vector vel = '0 0 0'; int eff_cnt = 1; bool eff_trail = eff.eent_eff_trail; - vector v; - v_x = ReadCoord(); - v_y = ReadCoord(); - v_z = ReadCoord(); + vector v = ReadVector(); bool use_vel = ReadByte(); if(use_vel) - { - vel_x = ReadCoord(); - vel_y = ReadCoord(); - vel_z = ReadCoord(); - } + vel = ReadVector(); if(!eff_trail) eff_cnt = ReadByte(); @@ -44,17 +37,13 @@ bool Net_Write_Effect(entity this, entity client, int sf) (Effects_COUNT >= 255) ? WriteShort(channel, this.m_id) : WriteByte(channel, this.m_id); - WriteCoord(channel, this.eent_net_location_x); - WriteCoord(channel, this.eent_net_location_y); - WriteCoord(channel, this.eent_net_location_z); + WriteVector(channel, this.eent_net_location); // attempt to save a tiny bit more bandwidth by not sending velocity if it isn't set if(this.eent_net_velocity) { WriteByte(channel, true); - WriteCoord(channel, this.eent_net_velocity_x); - WriteCoord(channel, this.eent_net_velocity_y); - WriteCoord(channel, this.eent_net_velocity_z); + WriteVector(channel, this.eent_net_velocity); } else { WriteByte(channel, false); } @@ -91,6 +80,6 @@ void Send_Effect_(string eff_name, vector eff_loc, vector eff_vel, int eff_cnt) } #endif -#ifdef EFFECTINFO_ENABLED +#if ENABLE_EFFECTINFO #include "effectinfo.qc" #endif