0
0
Fork 0
mirror of https://github.com/DrBeef/Raze.git synced 2024-12-14 06:31:17 +00:00
raze/wadsrc/static/zscript/games/duke/actors/airplane.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

38 lines
721 B
Text

class RedneckAirplane : DukeActor
{
default
{
pic "AIRPLANE";
}
override void Initialize()
{
self.extra = self.lotag;
self.cstat |= CSTAT_SPRITE_BLOCK_ALL;
self.Scale = (1, 1);
self.ChangeStat(STAT_ACTOR);
}
override void Tick()
{
if (self.extra)
{
if (self.extra == self.lotag)
Duke.PlaySound("PLANE");
self.extra--;
int j = self.movesprite((self.angle.ToVector() * self.hitag / 16., self.hitag / 128.), CLIPMASK0);
if (j > 0)
{
self.PlayActorSound("PIPEBOMB_EXPLODE");
self.Destroy();
}
if (self.extra == 0)
{
Duke.PlaySound("PLANEXP");
self.Destroy();
ud.earthquaketime = 32;
Duke.GetViewPlayer().pals = Color(32, 32, 32, 48);
}
}
}
}