raze/wadsrc/static/zscript/games/duke/actors/doorshock.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

23 lines
377 B
Text

class DukeDoorShock : DukeActor
{
default
{
pic "DOORSHOCK";
}
override void Initialize()
{
self.cstat |= CSTAT_SPRITE_BLOCK_ALL;
self.shade = -12;
self.ChangeStat(STAT_STANDABLE);
}
override void Tick()
{
let sectp = self.sector;
double j = abs(sectp.ceilingz - sectp.floorz) / 128.;
self.scale = (0.25, 0.0625 + j);
self.pos.Z = sectp.floorz;
}
}