raze/wadsrc/static/zscript/games/duke/actors/dukecstuff/ooz.zs

47 lines
706 B
Text
Raw Normal View History

2022-11-28 18:55:28 +00:00
class DukeOoz : DukeActor
{
default
{
pic "OOZ";
}
override void Initialize(DukeActor spawner)
2022-11-28 18:55:28 +00:00
{
self.shade = -12;
if (!self.mapSpawned)
2022-11-28 18:55:28 +00:00
{
if (self.bPAL8OOZ)
2022-11-28 18:55:28 +00:00
self.pal = 8;
if (!isRR()) self.insertspriteq();
2022-11-28 18:55:28 +00:00
}
self.getglobalz();
double z = ((self.floorz - self.ceilingz) / 128.);
self.scale = (max(0., 0.390625 - z * 0.5), z);
self.cstat |= randomXFlip();
self.ChangeStat(STAT_ACTOR);
2022-11-28 18:55:28 +00:00
}
override void Tick()
{
self.getglobalz();
double y = min((self.floorz - self.ceilingz) / 128, 4.);
double x = clamp(0.390625 - y * 0.5, 0.125, 0.75);
self.scale = (x, y);
self.pos.Z = self.floorz;
}
}
class DukeOoz2 : DukeActor
{
default
{
pic "OOZ2";
}
}