]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/triggers/func/door.qc
Merge branch 'master' into TimePath/scrollpanel
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / triggers / func / door.qc
index 48c91ec973b26a7d292444be4506e7ca561ff7c9..f768717c6bbde4c18c6ba50c6b05a7e773466b3a 100644 (file)
@@ -628,16 +628,10 @@ float door_send(entity this, entity to, float sf)
 
                trigger_common_write(this, true);
 
-               WriteCoord(MSG_ENTITY, this.pos1_x);
-               WriteCoord(MSG_ENTITY, this.pos1_y);
-               WriteCoord(MSG_ENTITY, this.pos1_z);
-               WriteCoord(MSG_ENTITY, this.pos2_x);
-               WriteCoord(MSG_ENTITY, this.pos2_y);
-               WriteCoord(MSG_ENTITY, this.pos2_z);
+               WriteVector(MSG_ENTITY, this.pos1);
+               WriteVector(MSG_ENTITY, this.pos2);
 
-               WriteCoord(MSG_ENTITY, this.size_x);
-               WriteCoord(MSG_ENTITY, this.size_y);
-               WriteCoord(MSG_ENTITY, this.size_z);
+               WriteVector(MSG_ENTITY, this.size);
 
                WriteShort(MSG_ENTITY, this.wait);
                WriteShort(MSG_ENTITY, this.speed);
@@ -653,16 +647,10 @@ float door_send(entity this, entity to, float sf)
 
        if(sf & SF_TRIGGER_UPDATE)
        {
-               WriteCoord(MSG_ENTITY, this.origin_x);
-               WriteCoord(MSG_ENTITY, this.origin_y);
-               WriteCoord(MSG_ENTITY, this.origin_z);
-
-               WriteCoord(MSG_ENTITY, this.pos1_x);
-               WriteCoord(MSG_ENTITY, this.pos1_y);
-               WriteCoord(MSG_ENTITY, this.pos1_z);
-               WriteCoord(MSG_ENTITY, this.pos2_x);
-               WriteCoord(MSG_ENTITY, this.pos2_y);
-               WriteCoord(MSG_ENTITY, this.pos2_z);
+               WriteVector(MSG_ENTITY, this.origin);
+
+               WriteVector(MSG_ENTITY, this.pos1);
+               WriteVector(MSG_ENTITY, this.pos2);
        }
 
        return true;
@@ -798,22 +786,10 @@ NET_HANDLE(ENT_CLIENT_DOOR, bool isnew)
 
                trigger_common_read(this, true);
 
-               vector v;
-
-               v.x = ReadCoord();
-               v.y = ReadCoord();
-               v.z = ReadCoord();
-               this.pos1 = v;
-
-               v.x = ReadCoord();
-               v.y = ReadCoord();
-               v.z = ReadCoord();
-               this.pos2 = v;
+               this.pos1 = ReadVector();
+               this.pos2 = ReadVector();
 
-               v.x = ReadCoord();
-               v.y = ReadCoord();
-               v.z = ReadCoord();
-               this.size = v;
+               this.size = ReadVector();
 
                this.wait = ReadShort();
                this.speed = ReadShort();
@@ -841,17 +817,11 @@ NET_HANDLE(ENT_CLIENT_DOOR, bool isnew)
 
        if(sf & SF_TRIGGER_UPDATE)
        {
-               this.origin_x = ReadCoord();
-               this.origin_y = ReadCoord();
-               this.origin_z = ReadCoord();
+               this.origin = ReadVector();
                setorigin(this, this.origin);
 
-               this.pos1_x = ReadCoord();
-               this.pos1_y = ReadCoord();
-               this.pos1_z = ReadCoord();
-               this.pos2_x = ReadCoord();
-               this.pos2_y = ReadCoord();
-               this.pos2_z = ReadCoord();
+               this.pos1 = ReadVector();
+               this.pos2 = ReadVector();
        }
        return true;
 }