raze/wadsrc/static/zscript/games/duke/actors/canwithsomething.zs
Christoph Oelckers 3a00480efd - do not use properties to set the sprite fields, part 1.
As soon as default init for CON gets in this won't work right anymore - these must come last, not first.
This commit contains all the trivial cases with no inheritance concerns.
2023-01-08 15:46:23 +01:00

35 lines
590 B
Text

class DukeCanWithSomething : DukeActor
{
Default
{
pic "CANWITHSOMETHING";
}
override void Initialize()
{
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();
}
}
}