void Ent_Antiwall_Remove()
{
- if(self.bgmscript)
- strunzone(self.bgmscript);
- self.bgmscript = string_null;
}
void Ent_Antiwall()
InterpolateOrigin_Undo();
self.iflags = IFLAG_ANGLES | IFLAG_ORIGIN;
- if(self.bgmscriptangular)
- fld = angles;
- else
- fld = origin;
- self.fld = self.saved;
-
f = ReadByte();
if(f & 1)
self.mins = self.maxs = '0 0 0';
setsize(self, self.mins, self.maxs);
- if(self.bgmscript)
- strunzone(self.bgmscript);
- self.bgmscript = ReadString();
- if(substring(self.bgmscript, 0, 1) == "<")
- {
- self.bgmscript = strzone(substring(self.bgmscript, 1, -1));
- self.bgmscriptangular = 1;
- }
- else
- {
- self.bgmscript = strzone(self.bgmscript);
- self.bgmscriptangular = 0;
- }
- if(self.bgmscript != "")
- {
- self.bgmscriptattack = ReadByte() / 64.0;
- self.bgmscriptdecay = ReadByte() / 64.0;
- self.bgmscriptsustain = ReadByte() / 255.0;
- self.bgmscriptrelease = ReadByte() / 64.0;
- self.movedir_x = ReadCoord();
- self.movedir_y = ReadCoord();
- self.movedir_z = ReadCoord();
- self.lip = ReadByte() / 255.0;
- }
-
self.fade_start = ReadShort();
self.fade_end = ReadShort();
self.alpha_max = ReadShort();
if (!self.alpha_max) {
self.alpha_max = 1;
}
- BGMScript_InitEntity(self);
}
InterpolateOrigin_Note();
- self.saved = self.fld;
-
self.entremove = Ent_Antiwall_Remove;
self.draw = Ent_Antiwall_Draw;
self.predraw = Ent_Antiwall_PreDraw;
#ifndef ANTIWALL_H
#define ANTIWALL_H
-.float lip;
-.float bgmscriptangular;
.int lodmodelindex0, lodmodelindex1, lodmodelindex2;
.float loddistance1, loddistance2;
-.vector saved;
.float inactive, alpha_max;
.float fade_start, fade_end;
.float illusion;
WriteCoord(MSG_ENTITY, self.maxs_y);
WriteCoord(MSG_ENTITY, self.maxs_z);
}
- WriteString(MSG_ENTITY, self.bgmscript);
- if(self.bgmscript != "")
- {
- WriteByte(MSG_ENTITY, floor(self.bgmscriptattack * 64));
- WriteByte(MSG_ENTITY, floor(self.bgmscriptdecay * 64));
- WriteByte(MSG_ENTITY, floor(self.bgmscriptsustain * 255));
- WriteByte(MSG_ENTITY, floor(self.bgmscriptrelease * 64));
- WriteCoord(MSG_ENTITY, self.movedir_x);
- WriteCoord(MSG_ENTITY, self.movedir_y);
- WriteCoord(MSG_ENTITY, self.movedir_z);
- WriteByte(MSG_ENTITY, floor(self.lip * 255));
- }
WriteShort(MSG_ENTITY, self.fade_start);
WriteShort(MSG_ENTITY, self.fade_end);
WriteShort(MSG_ENTITY, self.alpha_max);