2022-12-02 17:04:41 +00:00
|
|
|
class RedneckAirplane : DukeActor
|
|
|
|
{
|
|
|
|
default
|
|
|
|
{
|
|
|
|
pic "AIRPLANE";
|
|
|
|
}
|
|
|
|
|
|
|
|
override void Initialize()
|
|
|
|
{
|
|
|
|
self.extra = self.lotag;
|
|
|
|
self.cstat |= CSTAT_SPRITE_BLOCK_ALL;
|
2022-12-19 09:21:20 +00:00
|
|
|
self.Scale = (1, 1);
|
|
|
|
self.ChangeStat(STAT_ACTOR);
|
2022-12-02 17:04:41 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
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);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|