- self.platmovetype = strzone(ReadString());
- self.platmovetype_turn = ReadByte();
- self.spawnflags = ReadByte();
-
- self.model = strzone(ReadString());
- _setmodel(self, self.model);
-
- trigger_common_read(true);
-
- self.curvetarget = strzone(ReadString());
-
- 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.view_ofs_x = ReadCoord();
- self.view_ofs_y = ReadCoord();
- self.view_ofs_z = ReadCoord();
-
- self.mangle_x = ReadAngle();
- self.mangle_y = ReadAngle();
- self.mangle_z = ReadAngle();
-
- self.speed = ReadShort();
- self.height = ReadShort();
- self.lip = ReadByte();
- self.state = ReadByte();
- self.wait = ReadByte();
-
- self.dmg = ReadShort();
- self.dmgtime = ReadByte();
-
- self.classname = "func_train";
- self.solid = SOLID_BSP;
- self.movetype = MOVETYPE_PUSH;
- self.drawmask = MASK_NORMAL;
- self.draw = train_draw;
- self.entremove = trigger_remove_generic;
-
- if(set_platmovetype(self, self.platmovetype))
+ this.platmovetype = strzone(ReadString());
+ this.platmovetype_turn = ReadByte();
+ this.spawnflags = ReadByte();
+
+ this.model = strzone(ReadString());
+ _setmodel(this, this.model);
+
+ trigger_common_read(this, true);
+
+ this.curvetarget = strzone(ReadString());
+
+ 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.size_x = ReadCoord();
+ this.size_y = ReadCoord();
+ this.size_z = ReadCoord();
+
+ this.view_ofs_x = ReadCoord();
+ this.view_ofs_y = ReadCoord();
+ this.view_ofs_z = ReadCoord();
+
+ this.mangle_x = ReadAngle();
+ this.mangle_y = ReadAngle();
+ this.mangle_z = ReadAngle();
+
+ this.speed = ReadShort();
+ this.height = ReadShort();
+ this.lip = ReadByte();
+ this.state = ReadByte();
+ this.wait = ReadByte();
+
+ this.dmg = ReadShort();
+ this.dmgtime = ReadByte();
+
+ this.classname = "func_train";
+ this.solid = SOLID_BSP;
+ set_movetype(this, MOVETYPE_PUSH);
+ this.drawmask = MASK_NORMAL;
+ this.draw = train_draw;
+ if (isnew) IL_PUSH(g_drawables, this);
+ this.entremove = trigger_remove_generic;
+
+ if(set_platmovetype(this, this.platmovetype))