2022-11-19 11:54:15 +00:00
|
|
|
class DukeTrash : DukeActor
|
|
|
|
{
|
|
|
|
default
|
|
|
|
{
|
|
|
|
pic "TRASH";
|
|
|
|
}
|
|
|
|
|
2023-05-14 10:18:47 +00:00
|
|
|
override void Initialize(DukeActor spawner)
|
2022-11-19 11:54:15 +00:00
|
|
|
{
|
2022-12-19 09:21:20 +00:00
|
|
|
self.Scale = (0.375, 0.375);
|
2022-11-19 11:54:15 +00:00
|
|
|
self.angle = frandom(0, 360);
|
2022-12-19 09:21:20 +00:00
|
|
|
self.ChangeStat(STAT_STANDABLE);
|
2022-11-19 11:54:15 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
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();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|