]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/effects/qc/modeleffects.qc
Make ReadVector/WriteVector more commonly used
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / effects / qc / modeleffects.qc
index 1b70daee2fbbd5621e8e33198ffcec7c7380b2fd..26b3ec9f5285744b9f21d72abd82cab86669c5c0 100644 (file)
@@ -23,14 +23,10 @@ bool modeleffect_SendEntity(entity this, entity to, int sf)
        WriteShort(MSG_ENTITY, this.modelindex);
        WriteByte(MSG_ENTITY, this.skin);
        WriteByte(MSG_ENTITY, this.frame);
-       WriteCoord(MSG_ENTITY, this.origin.x);
-       WriteCoord(MSG_ENTITY, this.origin.y);
-       WriteCoord(MSG_ENTITY, this.origin.z);
+       WriteVector(MSG_ENTITY, this.origin);
        if(f & 1)
        {
-               WriteCoord(MSG_ENTITY, this.velocity.x);
-               WriteCoord(MSG_ENTITY, this.velocity.y);
-               WriteCoord(MSG_ENTITY, this.velocity.z);
+               WriteVector(MSG_ENTITY, this.velocity);
        }
        if(f & 2)
        {
@@ -124,15 +120,11 @@ NET_HANDLE(ENT_CLIENT_MODELEFFECT, bool isnew)
        e.skin = ReadByte();
        e.frame = ReadByte();
        e.frame1time = time;
-       e.origin_x = ReadCoord();
-       e.origin_y = ReadCoord();
-       e.origin_z = ReadCoord();
+       e.origin = ReadVector();
        setorigin(e, e.origin);
        if(f & 1)
        {
-               e.velocity_x = ReadCoord();
-               e.velocity_y = ReadCoord();
-               e.velocity_z = ReadCoord();
+               e.velocity = ReadVector();
        }
        if(f & 2)
        {