raze/wadsrc/static/zscript/games/duke/actors/redneckenemies/destructo.zs
Christoph Oelckers 513de38723 - pass the spawner to Initialize as an explicit parameter.
Using ownerActor is not robust, for some actors this will have unwanted side effects.
2023-05-19 22:57:26 +02:00

39 lines
643 B
Text

class RedneckDestructo : DukeActor
{
default
{
pic "DESTRUCTO";
statnum STAT_DESTRUCT;
+DESTRUCTOIMMUNE;
Strength MEGASTRENGTH;
}
override void Initialize(DukeActor spawner)
{
// do NOT run the default init code for this one.
}
override bool animate(tspritetype t)
{
t.cstat |= CSTAT_SPRITE_INVISIBLE;
return true;
}
}
class RedneckDestroyTags : DukeActor
{
default
{
pic "DESTROYTAGS";
+DESTRUCTOIMMUNE;
}
override void Initialize(DukeActor spawner)
{
self.cstat |= CSTAT_SPRITE_INVISIBLE;
self.scale = (REPEAT_SCALE, REPEAT_SCALE);
self.clipdist = 0.25;
self.ChangeStat(STAT_DESTRUCT);
}
}