From: terencehill Date: Sat, 27 May 2017 11:39:32 +0000 (+0200) Subject: Turn a few vec3 into vec2 X-Git-Tag: xonotic-v0.8.5~2750 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=f90066b859f550e0409e2b3130ad90b427a736b1;p=xonotic%2Fxonotic-data.pk3dir.git Turn a few vec3 into vec2 --- diff --git a/qcsrc/common/weapons/weapon/shockwave.qc b/qcsrc/common/weapons/weapon/shockwave.qc index 17d055fe4..b69b96632 100644 --- a/qcsrc/common/weapons/weapon/shockwave.qc +++ b/qcsrc/common/weapons/weapon/shockwave.qc @@ -460,7 +460,7 @@ void W_Shockwave_Attack(entity actor, .entity weaponentity) ); // figure out the direction of force - vel = normalize(vec3(head.velocity.x, head.velocity.y, 0)); + vel = normalize(vec2(head.velocity)); vel *= ( bound(0, (vlen(vel) / autocvar_sv_maxspeed), 1) diff --git a/qcsrc/lib/net.qh b/qcsrc/lib/net.qh index 56c80e02d..0a3dd8c66 100644 --- a/qcsrc/lib/net.qh +++ b/qcsrc/lib/net.qh @@ -311,14 +311,14 @@ USING(Stream, int); v += ReadByte(); // note: this is unsigned return v; } - #define ReadInt48_t() vec3(ReadInt24_t(), ReadInt24_t(), 0) + #define ReadInt48_t() vec2(ReadInt24_t(), ReadInt24_t()) #define ReadInt72_t() vec3(ReadInt24_t(), ReadInt24_t(), ReadInt24_t()) noref int _ReadSByte; #define ReadSByte() (_ReadSByte = ReadByte(), (_ReadSByte & BIT(7) ? -128 : 0) + (_ReadSByte & BITS(7))) #define ReadFloat() ReadCoord() #define ReadVector() vec3(ReadFloat(), ReadFloat(), ReadFloat()) - #define ReadVector2D() vec3(ReadFloat(), ReadFloat(), 0) + #define ReadVector2D() vec2(ReadFloat(), ReadFloat()) float ReadApproxPastTime() {