]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Turn a few vec3 into vec2
authorterencehill <piuntn@gmail.com>
Sat, 27 May 2017 11:39:32 +0000 (13:39 +0200)
committerterencehill <piuntn@gmail.com>
Sat, 27 May 2017 11:39:32 +0000 (13:39 +0200)
qcsrc/common/weapons/weapon/shockwave.qc
qcsrc/lib/net.qh

index 17d055fe4829b5ee0de9a7eb42e41e5233bf95cd..b69b9663229a75f8de6381c458774845eabc5128 100644 (file)
@@ -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)
index 56c80e02d1b13ca5dcf66105aa597bb7c28d67f3..0a3dd8c662a8ac8e1f91e26ab820b8cbe658f842 100644 (file)
@@ -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()
                {