2022-11-20 11:43:24 +00:00
|
|
|
|
|
|
|
class DukeActivator : DukeActor
|
|
|
|
{
|
|
|
|
override void Initialize()
|
|
|
|
{
|
|
|
|
self.cstat = CSTAT_SPRITE_INVISIBLE;
|
2022-12-19 09:29:01 +00:00
|
|
|
self.ChangeStat(STAT_ACTIVATOR);
|
2022-11-20 11:43:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/* this first needs work on the sector effectors.
|
|
|
|
override void onActivate(int low, DukePlayer plr)
|
|
|
|
{
|
|
|
|
switch (self.hitag)
|
|
|
|
{
|
|
|
|
case 0:
|
|
|
|
break;
|
|
|
|
case 1:
|
|
|
|
if (self.sector.floorz != self.sector.ceilingz)
|
|
|
|
{
|
|
|
|
continue;
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
case 2:
|
|
|
|
if (self.sector.floorz == self.sector.ceilingz)
|
|
|
|
{
|
|
|
|
continue;
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (self.sector.lotag < 3)
|
|
|
|
{
|
|
|
|
DukeSectIterator itr;
|
|
|
|
for(let a2 = itr.First(self.sector); a2; a2 = itr.Next())
|
|
|
|
{
|
|
|
|
// todo: move this into the effectors as a virtual override.
|
|
|
|
if (a2.statnum == STAT_EFFECTOR) switch (a2.lotag)
|
|
|
|
{
|
|
|
|
case SE_18_INCREMENTAL_SECTOR_RISE_FALL:
|
|
|
|
if (Raze.isRRRA()) break;
|
|
|
|
|
|
|
|
case SE_36_PROJ_SHOOTER:
|
|
|
|
case SE_31_FLOOR_RISE_FALL:
|
|
|
|
case SE_32_CEILING_RISE_FALL:
|
|
|
|
a2.temp_data[0] = 1 - a2.temp_data[0];
|
|
|
|
a2.callsound(self.sector());
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if (k == -1 && (self.sector.lotag & 0xff) == SE_22_TEETH_DOOR)
|
|
|
|
k = act.callsound(self.sector);
|
|
|
|
|
|
|
|
self.operatesectors(self.sector);
|
|
|
|
}
|
|
|
|
*/
|
|
|
|
}
|
|
|
|
|
|
|
|
class DukeLocator : DukeActor
|
|
|
|
{
|
|
|
|
override void Initialize()
|
|
|
|
{
|
|
|
|
self.cstat = CSTAT_SPRITE_INVISIBLE;
|
2022-12-19 09:29:01 +00:00
|
|
|
self.ChangeStat(STAT_LOCATOR);
|
2022-11-20 11:43:24 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
class DukeActivatorLocked : DukeActor
|
|
|
|
{
|
|
|
|
override void Initialize()
|
|
|
|
{
|
|
|
|
self.cstat = CSTAT_SPRITE_INVISIBLE;
|
2022-11-26 16:26:45 +00:00
|
|
|
if (!Raze.IsRR()) self.sector.lotag |= 16384;
|
|
|
|
else self.sector.lotag ^= 16384;
|
2022-12-19 09:29:01 +00:00
|
|
|
self.ChangeStat(STAT_ACTIVATOR);
|
2022-11-20 11:43:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/* must wait until Activator.onActivate can be done.
|
|
|
|
override void onActivate(int low, DukePlayer plr)
|
|
|
|
{
|
|
|
|
if (self.lotag == low)
|
|
|
|
{
|
|
|
|
self.sector.lotag ^= 16384;
|
|
|
|
|
|
|
|
if (plr)
|
|
|
|
{
|
|
|
|
if (self.sector.lotag & 16384)
|
|
|
|
plr.FTA(QUOTE_LOCKED, true);
|
|
|
|
else plr.FTA(QUOTE_UNLOCKED, true);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
*/
|
|
|
|
}
|
|
|
|
|
2022-11-20 12:57:51 +00:00
|
|
|
// Note: StaticSetup is run much earlier than Initialize! This is only meant for things that modify global game state.
|
|
|
|
|
|
|
|
class DukeCycler : DukeActor
|
|
|
|
{
|
|
|
|
override void StaticSetup()
|
|
|
|
{
|
|
|
|
dlevel.AddCycler(self.sector, self.lotag, self.shade, self.sector.floorshade, self.hitag, self.intangle == 1536);
|
|
|
|
self.Destroy();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
class DukeGPSpeed : DukeActor
|
|
|
|
{
|
|
|
|
override void StaticSetup()
|
|
|
|
{
|
|
|
|
self.sector.extra = self.lotag;
|
|
|
|
self.Destroy();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// the following ones are only used in RR.
|
2022-11-24 07:12:18 +00:00
|
|
|
class DukeTorchCtrl : DukeActor
|
2022-11-20 12:57:51 +00:00
|
|
|
{
|
|
|
|
override void StaticSetup()
|
|
|
|
{
|
|
|
|
dlevel.addtorch(self.sector, self.sector.floorshade, self.lotag);
|
|
|
|
self.Destroy();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
class DukeLightningCtrl : DukeActor
|
|
|
|
{
|
|
|
|
override void StaticSetup()
|
|
|
|
{
|
|
|
|
dlevel.addlightning(self.sector, self.sector.floorshade);
|
|
|
|
self.Destroy();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
class DukeShadeCtrl : DukeActor
|
|
|
|
{
|
|
|
|
override void StaticSetup()
|
|
|
|
{
|
|
|
|
self.sector.shadedsector = 1;
|
|
|
|
self.Destroy();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2022-12-14 14:26:32 +00:00
|
|
|
class DukeMinecartKiller : DukeActor
|
2022-11-20 12:57:51 +00:00
|
|
|
{
|
2022-12-16 11:47:30 +00:00
|
|
|
default
|
|
|
|
{
|
|
|
|
+BADGUY;
|
|
|
|
}
|
2022-11-20 12:57:51 +00:00
|
|
|
override void StaticSetup()
|
|
|
|
{
|
|
|
|
self.cstat |= CSTAT_SPRITE_INVISIBLE;
|
|
|
|
}
|
2022-12-14 14:26:32 +00:00
|
|
|
// This has a CON scripted part.
|
2022-11-20 12:57:51 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
class DukeSoundFX : DukeActor
|
|
|
|
{
|
|
|
|
override void StaticSetup()
|
|
|
|
{
|
|
|
|
self.cstat = CSTAT_SPRITE_INVISIBLE;
|
|
|
|
self.detail = dlevel.addambient(self.hitag, self.lotag);
|
|
|
|
self.lotag = self.hitag = 0;
|
|
|
|
}
|
2022-11-24 08:01:44 +00:00
|
|
|
|
|
|
|
// this actor needs to start on STAT_DEFAULT.
|
|
|
|
override void Initialize()
|
|
|
|
{
|
|
|
|
self.ChangeStat(STAT_ZOMBIEACTOR);
|
|
|
|
}
|
2022-11-20 12:57:51 +00:00
|
|
|
}
|
|
|
|
|
2022-12-03 19:20:22 +00:00
|
|
|
class RedneckMinecartDef : DukeActor
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
class RedneckMinecartSound : DukeActor
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
class RedneckMinecartInner : DukeActor
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
class RedneckJaildoorDef : DukeActor
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
class RedneckJaildoorSound : DukeActor
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
class RedneckGeometryEffect : DukeActor
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
class RedneckKeyinfoSetter : DukeActor
|
|
|
|
{
|
|
|
|
}
|
2022-12-13 23:11:35 +00:00
|
|
|
|
2022-12-14 20:49:20 +00:00
|
|
|
class RedneckUfoBeam : DukeActor
|
|
|
|
{
|
|
|
|
default
|
|
|
|
{
|
|
|
|
pic "UFOBEAM";
|
2022-12-16 11:47:30 +00:00
|
|
|
+BADGUY;
|
2022-12-14 20:49:20 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
override bool animate(tspritetype t)
|
|
|
|
{
|
|
|
|
t.cstat |= CSTAT_SPRITE_INVISIBLE;
|
|
|
|
self.cstat |= CSTAT_SPRITE_INVISIBLE;
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
class RedneckInvisible : DukeActor
|
|
|
|
{
|
|
|
|
default
|
|
|
|
{
|
|
|
|
pic "RRTILE3586";
|
|
|
|
}
|
|
|
|
|
|
|
|
override bool animate(tspritetype t)
|
|
|
|
{
|
|
|
|
t.cstat |= CSTAT_SPRITE_INVISIBLE;
|
|
|
|
self.cstat |= CSTAT_SPRITE_INVISIBLE;
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
class RedneckLadder : DukeActor
|
|
|
|
{
|
|
|
|
default
|
|
|
|
{
|
|
|
|
pic "Ladder";
|
|
|
|
}
|
|
|
|
|
|
|
|
override bool animate(tspritetype t)
|
|
|
|
{
|
|
|
|
t.cstat |= CSTAT_SPRITE_INVISIBLE;
|
|
|
|
self.cstat |= CSTAT_SPRITE_INVISIBLE;
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
class RedneckDestructo : DukeActor
|
|
|
|
{
|
|
|
|
default
|
|
|
|
{
|
|
|
|
pic "DESTRUCTO";
|
|
|
|
statnum STAT_DESTRUCT;
|
|
|
|
}
|
|
|
|
|
|
|
|
override bool animate(tspritetype t)
|
|
|
|
{
|
|
|
|
t.cstat |= CSTAT_SPRITE_INVISIBLE;
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
class RedneckDestroyTags : DukeActor
|
|
|
|
{
|
|
|
|
default
|
|
|
|
{
|
|
|
|
pic "DESTROYTAGS";
|
|
|
|
}
|
|
|
|
override void Initialize()
|
|
|
|
{
|
|
|
|
self.cstat |= CSTAT_SPRITE_INVISIBLE;
|
|
|
|
self.scale = (REPEAT_SCALE, REPEAT_SCALE);
|
|
|
|
self.clipdist = 0.25;
|
|
|
|
self.ChangeStat(STAT_DESTRUCT);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
class RedneckPistonSoundEnabler : DukeActor
|
|
|
|
{
|
|
|
|
override void StaticSetup()
|
|
|
|
{
|
|
|
|
ud.pistonsound = true;
|
|
|
|
self.Destroy();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
class RedneckFogEnabler : DukeActor
|
|
|
|
{
|
|
|
|
override void StaticSetup()
|
|
|
|
{
|
|
|
|
ud.fogactive = true;
|
|
|
|
self.Destroy();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
class RedneckSeasickEnabler : DukeActor
|
|
|
|
{
|
|
|
|
override void StaticSetup()
|
|
|
|
{
|
|
|
|
// this is so wrong... :(
|
|
|
|
Duke.GetViewPlayer().sea_sick_stat = true;
|
|
|
|
self.Destroy();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|