hexen2-hw-hc/xray.hc

51 lines
1.1 KiB
C++
Raw Permalink Normal View History

1999-01-27 00:00:00 +00:00
void MakeOpaque (void)
{
entity checking;
checking=world;
checking=nextent(checking);
while(checking!=world)
{
if(checking.drawflags&DRF_TRANSLUCENT&&(
checking.classname=="door"||
checking.classname=="door_rotating"||
checking.classname=="secret door"||
checking.classname=="pushable brush"))
checking.drawflags(-)DRF_TRANSLUCENT;
checking=nextent(checking);
}
remove(self);
}
void FindDoorsAndStuff (void)
{
entity checking;
checking=world;
checking=nextent(checking);
while(checking!=world)
{
if(!checking.drawflags&DRF_TRANSLUCENT&&(
checking.classname=="door"||
checking.classname=="door_rotating"||
checking.classname=="secret door"||
checking.classname=="pushable brush"))
checking.drawflags(+)DRF_TRANSLUCENT;
checking=nextent(checking);
}
self.think=MakeOpaque;
thinktime self : 15;
}
void Supes (void)
{
newmis=spawn();
newmis.owner=self;
newmis.solid=SOLID_NOT;
newmis.movetype=MOVETYPE_FLYMISSILE;
newmis.think=FindDoorsAndStuff;
thinktime newmis : 0;
setorigin(newmis,self.origin+self.proj_ofs);
}