mirror of
https://github.com/ZDoom/Raze.git
synced 2024-12-11 13:21:49 +00:00
3a00480efd
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.
29 lines
460 B
Text
29 lines
460 B
Text
class DukeTrash : DukeActor
|
|
{
|
|
default
|
|
{
|
|
pic "TRASH";
|
|
}
|
|
|
|
override void Initialize()
|
|
{
|
|
self.Scale = (0.375, 0.375);
|
|
self.angle = frandom(0, 360);
|
|
self.ChangeStat(STAT_STANDABLE);
|
|
}
|
|
|
|
override void Tick()
|
|
{
|
|
if (self.vel.X == 0) self.vel.X = 1 / 16.;
|
|
if (self.DoMove(CLIPMASK0))
|
|
{
|
|
self.makeitfall();
|
|
if (random(0, 1)) self.vel.Z -= 1;
|
|
if (abs(self.vel.X) < 3)
|
|
self.vel.X += random(0, 3) / 16.;
|
|
}
|
|
else self.Destroy();
|
|
}
|
|
}
|
|
|
|
|