2022-12-03 17:43:15 +00:00
|
|
|
|
|
|
|
class RedneckEmptyBike : DukeActor
|
|
|
|
{
|
|
|
|
default
|
|
|
|
{
|
|
|
|
pic "EMPTYBIKE";
|
2022-12-16 11:47:30 +00:00
|
|
|
+ALWAYSROTATE2;
|
2022-12-03 17:43:15 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
override void Initialize()
|
|
|
|
{
|
|
|
|
if (ud.multimode < 2 && self.pal == 1)
|
|
|
|
{
|
|
|
|
self.scale = (0, 0);
|
|
|
|
self.ChangeStat(STAT_MISC);
|
|
|
|
return;
|
|
|
|
}
|
2022-12-19 09:21:20 +00:00
|
|
|
self.lotag = 1;
|
|
|
|
self.Scale = (0.28125, 0.28125);
|
2022-12-03 17:43:15 +00:00
|
|
|
self.pal = 0;
|
|
|
|
self.setClipDistFromTile();
|
|
|
|
self.saved_ammo = 100;
|
|
|
|
self.cstat = CSTAT_SPRITE_BLOCK_ALL;
|
2022-12-19 09:21:20 +00:00
|
|
|
self.ChangeStat(STAT_ACTOR);
|
2022-12-03 17:43:15 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
override void Tick()
|
|
|
|
{
|
|
|
|
self.makeitfall();
|
|
|
|
self.getglobalz();
|
|
|
|
if (self.sector.lotag == ST_1_ABOVE_WATER)
|
|
|
|
{
|
|
|
|
self.setPosition((self.pos.XY, self.floorz + 16));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
override bool OnUse(DukePlayer p)
|
|
|
|
{
|
|
|
|
if (!p.OnMotorcycle && p.cursector.lotag != ST_2_UNDERWATER)
|
|
|
|
{
|
|
|
|
p.actor.pos.XY = self.pos.XY;
|
|
|
|
p.SetTargetAngle(self.angle, true);
|
|
|
|
p.ammo_amount[RRWpn.MOTORCYCLE_WEAPON] = self.saved_ammo;
|
|
|
|
self.Destroy();
|
|
|
|
p.StartMotorcycle();
|
|
|
|
}
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
class RedneckEmptyBoat : DukeActor
|
|
|
|
{
|
|
|
|
default
|
|
|
|
{
|
|
|
|
pic "EMPTYBOAT";
|
2022-12-16 11:47:30 +00:00
|
|
|
+ALWAYSROTATE2;
|
2022-12-21 15:31:51 +00:00
|
|
|
falladjustz 6;
|
2022-12-03 17:43:15 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
override void Initialize()
|
|
|
|
{
|
|
|
|
if (ud.multimode < 2 && self.pal == 1)
|
|
|
|
{
|
|
|
|
self.scale = (0, 0);
|
|
|
|
self.ChangeStat(STAT_MISC);
|
|
|
|
return;
|
|
|
|
}
|
2022-12-19 09:21:20 +00:00
|
|
|
self.lotag = 1;
|
|
|
|
self.Scale = (0.5, 0.5);
|
2022-12-03 17:43:15 +00:00
|
|
|
self.pal = 0;
|
|
|
|
self.setClipDistFromTile();
|
|
|
|
self.saved_ammo = 20;
|
|
|
|
self.cstat = CSTAT_SPRITE_BLOCK_ALL;
|
2022-12-19 09:21:20 +00:00
|
|
|
self.ChangeStat(STAT_ACTOR);
|
2022-12-03 17:43:15 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
override void Tick()
|
|
|
|
{
|
|
|
|
self.makeitfall();
|
|
|
|
self.getglobalz();
|
|
|
|
}
|
|
|
|
|
|
|
|
override bool OnUse(DukePlayer p)
|
|
|
|
{
|
|
|
|
if (!p.OnBoat)
|
|
|
|
{
|
|
|
|
p.actor.pos.XY = self.pos.XY;
|
|
|
|
p.SetTargetAngle(self.angle, true);
|
|
|
|
p.ammo_amount[RRWpn.BOAT_WEAPON] = self.saved_ammo;
|
|
|
|
self.Destroy();
|
|
|
|
p.StartBoat();
|
|
|
|
}
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
}
|