- self.classname = strzone(ReadString());
- self.spawnflags = ReadByte();
-
- self.mdl = strzone(ReadString());
- _setmodel(self, self.mdl);
-
- trigger_common_read(true);
-
- self.pos1_x = ReadCoord();
- self.pos1_y = ReadCoord();
- self.pos1_z = ReadCoord();
- self.pos2_x = ReadCoord();
- self.pos2_y = ReadCoord();
- self.pos2_z = ReadCoord();
-
- self.size_x = ReadCoord();
- self.size_y = ReadCoord();
- self.size_z = ReadCoord();
-
- self.wait = ReadShort();
- self.speed = ReadShort();
- self.lip = ReadByte();
- self.state = ReadByte();
- self.SUB_LTIME = ReadCoord();
-
- self.solid = SOLID_BSP;
- self.movetype = MOVETYPE_PUSH;
- self.trigger_touch = door_touch;
- self.draw = door_draw;
- self.drawmask = MASK_NORMAL;
- self.use = door_use;
-
- LinkDoors();
-
- if(self.spawnflags & DOOR_START_OPEN)
- door_init_startopen();
-
- self.move_time = time;
- self.move_origin = self.origin;
- self.move_movetype = MOVETYPE_PUSH;
- self.move_angles = self.angles;
- self.move_blocked = door_blocked;
+ this.classname = strzone(ReadString());
+ this.spawnflags = ReadByte();
+
+ this.mdl = strzone(ReadString());
+ _setmodel(this, this.mdl);
+
+ 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;
+
+ v.x = ReadCoord();
+ v.y = ReadCoord();
+ v.z = ReadCoord();
+ this.size = v;
+
+ this.wait = ReadShort();
+ this.speed = ReadShort();
+ this.lip = ReadByte();
+ this.state = ReadByte();
+ this.SUB_LTIME = ReadCoord();
+
+ this.solid = SOLID_BSP;
+ this.movetype = MOVETYPE_PUSH;
+ this.use = door_use;
+
+ LinkDoors(this);
+
+ if(this.spawnflags & DOOR_START_OPEN)
+ door_init_startopen(this);
+
+ this.move_time = time;
+ this.move_origin = this.origin;
+ this.move_movetype = MOVETYPE_PUSH;
+ this.move_angles = this.angles;
+ this.move_blocked = door_blocked;