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

46 lines
775 B
Text

class DukeCar : DukeActor
{
default
{
pic "DUKECAR";
}
override void Initialize()
{
self.extra = 1;
self.clipdist = 32;
self.vel.X = 292 / 16.;
self.vel.Z = 360 / 256.;
self.cstat = CSTAT_SPRITE_BLOCK_ALL;
self.ChangeStat(STAT_ACTOR);
}
override void Tick()
{
self.pos.Z += self.vel.Z;
self.temp_data[0]++;
if (self.temp_data[0] == 4) self.PlayActorSound("WAR_AMBIENCE2");
if (self.temp_data[0] > (26 * 8))
{
Duke.PlaySound("RPG_EXPLODE");
for (int j = 0; j < 32; j++)
self.RANDOMSCRAP();
ud.earthquaketime = 16;
self.Destroy();
return;
}
else if ((self.temp_data[0] & 3) == 0)
self.spawn("DukeExplosion2");
self.DoMove(CLIPMASK0);
}
}
class DukeHelicopter : DukeCar
{
default
{
pic "HELECOPT";
}
}