2022-11-30 16:15:44 +00:00
|
|
|
class DukeCar : DukeActor
|
|
|
|
{
|
|
|
|
default
|
|
|
|
{
|
|
|
|
pic "DUKECAR";
|
|
|
|
}
|
|
|
|
|
|
|
|
override void Initialize()
|
|
|
|
{
|
2022-12-19 09:21:20 +00:00
|
|
|
self.extra = 1;
|
|
|
|
self.clipdist = 32;
|
2022-11-30 16:15:44 +00:00
|
|
|
self.vel.X = 292 / 16.;
|
|
|
|
self.vel.Z = 360 / 256.;
|
|
|
|
self.cstat = CSTAT_SPRITE_BLOCK_ALL;
|
2022-12-19 09:21:20 +00:00
|
|
|
self.ChangeStat(STAT_ACTOR);
|
2022-11-30 16:15:44 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
override void Tick()
|
|
|
|
{
|
|
|
|
self.pos.Z += self.vel.Z;
|
2022-12-22 08:49:42 +00:00
|
|
|
self.counter++;
|
2022-11-30 16:15:44 +00:00
|
|
|
|
2022-12-22 08:49:42 +00:00
|
|
|
if (self.counter == 4) self.PlayActorSound("WAR_AMBIENCE2");
|
2022-11-30 16:15:44 +00:00
|
|
|
|
2022-12-22 08:49:42 +00:00
|
|
|
if (self.counter > (26 * 8))
|
2022-11-30 16:15:44 +00:00
|
|
|
{
|
|
|
|
Duke.PlaySound("RPG_EXPLODE");
|
|
|
|
for (int j = 0; j < 32; j++)
|
|
|
|
self.RANDOMSCRAP();
|
|
|
|
ud.earthquaketime = 16;
|
|
|
|
self.Destroy();
|
|
|
|
return;
|
|
|
|
}
|
2022-12-22 08:49:42 +00:00
|
|
|
else if ((self.counter & 3) == 0)
|
2022-11-30 16:15:44 +00:00
|
|
|
self.spawn("DukeExplosion2");
|
|
|
|
self.DoMove(CLIPMASK0);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
class DukeHelicopter : DukeCar
|
|
|
|
{
|
|
|
|
default
|
|
|
|
{
|
|
|
|
pic "HELECOPT";
|
|
|
|
}
|
|
|
|
}
|