2022-11-21 20:33:27 +00:00
|
|
|
|
|
|
|
class RedneckLumberBlade : DukeActor
|
|
|
|
{
|
|
|
|
default
|
|
|
|
{
|
|
|
|
spriteset "LUMBERBLADE1", "LUMBERBLADE";
|
|
|
|
}
|
2022-12-19 09:21:20 +00:00
|
|
|
|
|
|
|
override void Initialize()
|
|
|
|
{
|
|
|
|
self.ChangeStat(STAT_LUMBERMILL);
|
|
|
|
self.extra = 0;
|
|
|
|
}
|
2022-11-21 20:33:27 +00:00
|
|
|
|
|
|
|
override void Tick()
|
|
|
|
{
|
|
|
|
if (self.hitag == 100)
|
|
|
|
{
|
|
|
|
self.pos.Z += 4;
|
|
|
|
if (self.pos.Z >= self.sector.floorz + 59.25)
|
|
|
|
self.pos.Z = self.sector.floorz + 59.25;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (self.spritesetindex == 1)
|
|
|
|
{
|
|
|
|
self.extra++;
|
|
|
|
if (self.extra == 192)
|
|
|
|
{
|
|
|
|
self.hitag = 0;
|
|
|
|
self.pos.Z = self.sector.floorz - 59.25;
|
|
|
|
self.extra = 0;
|
|
|
|
self.setSpritesetImage(0);
|
|
|
|
dlevel.resetswitch(999);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
override bool onUse(DukePlayer user)
|
|
|
|
{
|
|
|
|
if (user == null) // guard against unwanted activation
|
|
|
|
{
|
|
|
|
self.setSpritesetImage(1);
|
|
|
|
self.hitag = 100;
|
|
|
|
self.extra = 0;
|
2022-11-24 20:27:08 +00:00
|
|
|
self.PlayActorSound("BK_JIB2");
|
2022-11-21 20:33:27 +00:00
|
|
|
return true;
|
|
|
|
}
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
|
|
|
override void onTouch(DukePlayer user)
|
|
|
|
{
|
|
|
|
if (self.spritesetindex == 0)
|
|
|
|
{
|
|
|
|
user.quickkill();
|
2022-11-24 20:27:08 +00:00
|
|
|
user.actor.PlayActorSound("JOE9000B");
|
2022-11-21 20:33:27 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// Development garbage?
|
|
|
|
Class RedneckKegHolder : DukeActor
|
|
|
|
{
|
|
|
|
default
|
|
|
|
{
|
|
|
|
pic "KEGHOLDER";
|
|
|
|
}
|
|
|
|
|
|
|
|
override void Initialize()
|
|
|
|
{
|
|
|
|
self.cstat = CSTAT_SPRITE_INVISIBLE;
|
2022-12-19 09:21:20 +00:00
|
|
|
self.ChangeStat(STAT_LUMBERMILL);
|
2022-11-21 20:33:27 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
override bool OnUse(DukePlayer user)
|
|
|
|
{
|
|
|
|
if (user != null) return false;
|
|
|
|
self.Destroy();
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|