2 .float bgmscriptangular;
10 InterpolateOrigin_Do();
12 if(self.bgmscriptangular)
21 if(self.lip < 0) // < 0: alpha goes from 1 to 1-|lip| when toggled (toggling subtracts lip)
22 self.alpha = 1 + self.lip * f;
23 else // > 0: alpha goes from 1-|lip| to 1 when toggled (toggling adds lip)
24 self.alpha = 1 - self.lip * (1 - f);
25 self.fld = self.fld + self.movedir * f;
30 if(self.alpha >= ALPHA_MIN_VISIBLE)
36 void Ent_Wall_Remove()
39 strunzone(self.bgmscript);
40 self.bgmscript = string_null;
46 InterpolateOrigin_Undo();
47 self.iflags = IFLAG_ANGLES;
54 self.colormap = ReadShort();
61 self.origin_x = ReadCoord();
62 self.origin_y = ReadCoord();
63 self.origin_z = ReadCoord();
70 self.angles_x = ReadAngle();
71 self.angles_y = ReadAngle();
72 self.angles_z = ReadAngle();
75 self.angles = '0 0 0';
80 self.modelindex = ReadShort();
81 self.solid = ReadByte();
82 self.scale = ReadByte() / 16.0;
85 self.mins_x = ReadCoord();
86 self.mins_y = ReadCoord();
87 self.mins_z = ReadCoord();
88 self.maxs_x = ReadCoord();
89 self.maxs_y = ReadCoord();
90 self.maxs_z = ReadCoord();
93 self.mins = self.maxs = '0 0 0';
96 strunzone(self.bgmscript);
97 self.bgmscript = ReadString();
98 if(substring(self.bgmscript, 0, 1) == "<")
100 self.bgmscript = strzone(substring(self.bgmscript, 1, -1));
101 self.bgmscriptangular = 1;
105 self.bgmscript = strzone(self.bgmscript);
106 self.bgmscriptangular = 0;
108 if(self.bgmscript != "")
110 self.bgmscriptattack = ReadByte() / 64.0;
111 self.bgmscriptdecay = ReadByte() / 64.0;
112 self.bgmscriptsustain = ReadByte() / 255.0;
113 self.bgmscriptrelease = ReadByte() / 64.0;
114 self.movedir_x = ReadCoord();
115 self.movedir_y = ReadCoord();
116 self.movedir_z = ReadCoord();
117 self.lip = ReadByte() / 255.0;
119 BGMScript_InitEntity(self);
122 InterpolateOrigin_Note();
124 self.entremove = Ent_Wall_Remove;
125 self.draw = Ent_Wall_Draw;