mirror of
https://github.com/ZDoom/Raze.git
synced 2024-12-12 05:32:14 +00:00
513de38723
Using ownerActor is not robust, for some actors this will have unwanted side effects.
37 lines
648 B
Text
37 lines
648 B
Text
|
|
class DukeCanWithSomething : DukeActor
|
|
{
|
|
Default
|
|
{
|
|
pic "CANWITHSOMETHING";
|
|
+CHECKSLEEP;
|
|
+MOVEFTA_MAKESTANDABLE;
|
|
}
|
|
|
|
override void Initialize(DukeActor spawner)
|
|
{
|
|
if (!self.mapSpawned)
|
|
self.scale = (0.5, 0.5);
|
|
self.makeitfall();
|
|
self.cstat = CSTAT_SPRITE_BLOCK_ALL | randomXFlip();
|
|
self.extra = 0;
|
|
self.clipdist = 18;
|
|
self.ChangeStat(STAT_ZOMBIEACTOR);
|
|
}
|
|
|
|
|
|
override void Tick()
|
|
{
|
|
self.makeitfall();
|
|
int j = self.ifhitbyweapon();
|
|
if (j >= 0)
|
|
{
|
|
self.PlayActorSound("VENT_BUST");
|
|
for (j = 0; j < 10; j++)
|
|
self.RANDOMSCRAP();
|
|
|
|
if (self.lotag) self.spawnsprite(self.lotag);
|
|
self.Destroy();
|
|
}
|
|
}
|
|
}
|