- moved Duke's miscellaneous stuff to a subfolder.

This commit is contained in:
Christoph Oelckers 2022-12-31 10:53:03 +01:00
parent 486745a4e1
commit 84b372f35a
24 changed files with 1462 additions and 1135 deletions

View file

@ -63,17 +63,10 @@ version "4.10"
#include "zscript/games/duke/actors/projectiles.zs"
#include "zscript/games/duke/actors/mortar.zs"
#include "zscript/games/duke/actors/recon.zs"
#include "zscript/games/duke/actors/destructibles.zs"
#include "zscript/games/duke/actors/greenslime.zs"
#include "zscript/games/duke/actors/heavyhbomb.zs"
#include "zscript/games/duke/actors/transporter.zs"
#include "zscript/games/duke/actors/toiletwater.zs"
#include "zscript/games/duke/actors/burning.zs"
#include "zscript/games/duke/actors/explosion2.zs"
#include "zscript/games/duke/actors/waterbubble.zs"
#include "zscript/games/duke/actors/smallsmoke.zs"
#include "zscript/games/duke/actors/steam.zs"
#include "zscript/games/duke/actors/dukedecos.zs"
#include "zscript/games/duke/actors/player.zs"
@ -82,7 +75,6 @@ version "4.10"
#include "zscript/games/duke/actors/sixpak.zs"
#include "zscript/games/duke/actors/atomichealth.zs"
#include "zscript/games/duke/actors/boss5.zs"
#include "zscript/games/duke/actors/females.zs"
#include "zscript/games/duke/actors/flamethrowerflame.zs"
#include "zscript/games/duke/actors/firefly.zs"
@ -161,6 +153,14 @@ version "4.10"
#include "zscript/games/duke/actors/dukestuff/blimp.zs"
#include "zscript/games/duke/actors/dukestuff/breakables.zs"
#include "zscript/games/duke/actors/dukestuff/effects.zs"
#include "zscript/games/duke/actors/dukestuff/females.zs"
#include "zscript/games/duke/actors/dukestuff/fire.zs"
#include "zscript/games/duke/actors/dukestuff/items.zs"
#include "zscript/games/duke/actors/dukestuff/player.zs"
#include "zscript/games/duke/actors/dukestuff/rubbercan.zs"
#include "zscript/games/duke/actors/dukestuff/stuff.zs"
#include "zscript/games/duke/actors/redneckcstuff/airplane.zs"
#include "zscript/games/duke/actors/redneckcstuff/balloons.zs"
#include "zscript/games/duke/actors/redneckcstuff/bowling.zs"

View file

@ -24,59 +24,3 @@ class RedneckMotoHit : DukeActor
}
}
// placeholders for CON scripted actors where we need the class.
class DukeForceRipple : DukeActor
{
default
{
pic "FORCERIPPLE";
+FORCERUNCON;
}
}
class DukeBurnedCorpse : DukeActor
{
default
{
pic "BURNEDCORPSE";
+FORCERUNCON;
}
}
class DukeSpeaker : DukeActor
{
default
{
pic "SPEAKER";
+NOFALLER;
}
}
class DukeFem6Pad: DukeActor
{
default
{
pic "FEM6PAD";
}
}
class DukeHotMeat : DukeActor // (4427)
{
default
{
pic "HOTMEAT";
}
}
class DukeLavaBubble : DukeActor // (4340)
{
default
{
pic "LAVABUBBLE";
}
}

View file

@ -1,26 +1,3 @@
class DukeAtomicHealth : DukeItemBase
{
default
{
pic "ATOMICHEALTH";
+FULLBRIGHT;
+BIGHEALTH;
+NOFLOORPAL;
}
override void Initialize()
{
commonItemSetup();
self.cstat |= CSTAT_SPRITE_YCENTER;
}
override bool animate(tspritetype t)
{
t.pos.Z -= 4;
return false;
}
}
class RedneckGoogooCluster : DukeItemBase
{
default

View file

@ -1,16 +1,3 @@
class DukeBatteryAmmo : DukeActor
{
default
{
pic "BATTERYAMMO";
}
override void Initialize()
{
commonItemSetup();
}
}
class RedneckRifleAmmo : DukeActor
{
default

View file

@ -1,112 +1,3 @@
class DukeFloorFlame : DukeActor
{
default
{
pic "FLOORFLAME";
+FULLBRIGHT;
+FORCERUNCON;
}
override void Initialize()
{
self.shade = -127;
self.ChangeStat(STAT_STANDABLE);
}
}
class DukeBurning : DukeActor
{
default
{
pic "BURNING";
+FULLBRIGHT;
+FORCERUNCON;
+NOTELEPORT;
+NOFLOORPAL;
}
override void Initialize()
{
if (!self.mapSpawned)
{
double c,f;
[c, f] = self.sector.getSlopes(self.pos.XY);
self.pos.Z = min(self.pos.Z, f - 12);
}
self.Scale = (0.0625, 0.0625);
self.ChangeStat(STAT_MISC);
}
override bool animate(tspritetype t)
{
let OwnerAc = self.ownerActor;
if (OwnerAc && OwnerAc.statnum == STAT_PLAYER)
{
let p = Duke.GetViewPlayer();
if (display_mirror == 0 && OwnerAc == p.actor && p.over_shoulder_on == 0)
t.scale = (0, 0);
else
{
// not needed.
//t.Angle = (viewVec - t.pos.XY()).Angle();
//t.pos.XY = OwnerAc.pos.XY + t.Angle.ToVector();
}
}
t.cstat |= CSTAT_SPRITE_YCENTER;
double d;
if (!bNOFLOORFIRE)
[d, t.pos.Z] = t.sector.getSlopes(t.pos.XY);
return false;
}
}
class DukeBurning2 : DukeBurning
{
default
{
pic "BURNING2";
}
}
class RedneckFire : DukeActor
{
default
{
pic "FIRE";
+FULLBRIGHT;
+NOTELEPORT;
+NOFLOORPAL;
}
override bool animate(tspritetype t)
{
let OwnerAc = self.ownerActor;
double d;
[d, t.pos.Z] = t.sector.getSlopes(t.pos.XY);
return false;
}
}
class DukeFire : RedneckFire
{
override bool animate(tspritetype t)
{
super.animate(t);
t.cstat |= CSTAT_SPRITE_YCENTER;
return false;
}
}
class DukeFire2 : DukeFire
{
default
{
pic "FIRE2";
}
}
class DukeOnFire : DukeActor
{
default

View file

@ -1,34 +0,0 @@
class DukeStatueFlash : DukeActor
{
default
{
pic "STATUEFLASH";
+HITRADIUSCHECK;
}
override void Initialize()
{
self.clipdist = 32;
self.cstat |= CSTAT_SPRITE_BLOCK_ALL;
}
override void OnHit(DukeActor proj)
{
self.lotsofcolourglass(40);
self.PlayActorSound("GLASS_HEAVYBREAK");
self.angle = frandom(0, 360);
self.lotsofglass(8);
self.Destroy();
}
}
class DukeStatue : DukeStatueFlash
{
default
{
pic "STATUE";
+TRIGGERRESPAWN;
}
}

View file

@ -1,182 +1,21 @@
class DukeHorseOnSide : DukeActor
class DukeLavaBubble : DukeActor // (4340)
{
default
{
pic "HORSEONSIDE";
+FORCERUNCON;
+CHECKSLEEP;
+MOVEFTA_MAKESTANDABLE;
}
override void Initialize()
{
if (!self.mapSpawned)
self.scale = (0.5, 0.5);
self.cstat = CSTAT_SPRITE_BLOCK_ALL | randomXFlip();
self.clipdist = 18;
self.ChangeStat(STAT_ZOMBIEACTOR);
pic "LAVABUBBLE";
}
}
class DukeExplodingBarrel : DukeHorseOnSide
class DukeBurnedCorpse : DukeActor
{
default
{
pic "EXPLODINGBARREL";
+DOUBLEDMGTHRUST;
+BREAKMIRRORS;
}
}
class DukeFireBarrel : DukeHorseOnSide
{
default
{
pic "FIREBARREL";
}
}
class DukeNukeBarrel : DukeHorseOnSide
{
default
{
pic "NUKEBARREL";
+GREENBLOOD;
}
}
class DukeFireVase : DukeHorseOnSide
{
default
{
pic "FIREVASE";
}
}
class DukeNukeBarrelDented : DukeHorseOnSide
{
default
{
pic "NUKEBARRELDENTED";
}
}
class DukeNukeBarrelLeaked : DukeHorseOnSide
{
default
{
pic "NUKEBARRELLEAKED";
}
}
class DukeWoodenHorse : DukeHorseOnSide
{
default
{
pic "WOODENHORSE";
}
}
class DukeRubberCan : DukeHorseOnSide
{
default
{
pic "RUBBERCAN";
}
override void Initialize()
{
super.Initialize();
self.extra = 0;
}
}
class DukeWaterdripSplash : DukeActor
{
default
{
pic "WATERDRIPSPLASH";
}
override void Initialize()
{
self.scale = (0.375, 0.375);
self.ChangeStat(STAT_STANDABLE);
}
}
class DukeWaterbubbleMaker : DukeActor
{
default
{
pic "WATERBUBBLEMAKER";
pic "BURNEDCORPSE";
+FORCERUNCON;
}
override void Initialize()
{
self.hitag = 0;
self.cstat |= CSTAT_SPRITE_INVISIBLE;
self.ChangeStat(STAT_STANDABLE);
}
}
class DukeFeces : DukeActor
{
default
{
pic "FECES";
+FORCERUNCON;
+BROWNBLOOD;
}
override void Initialize()
{
if (!mapSpawned)
self.scale = (REPEAT_SCALE, REPEAT_SCALE);
self.ChangeStat(STAT_MISC);
}
}
class DukeBlood : DukeActor
{
default
{
pic "BLOOD";
+FORCERUNCON;
}
override void Initialize()
{
self.pos.Z -= 26;
if (!mapSpawned && self.ownerActor && self.ownerActor.pal == 6)
self.pal = 6;
self.scale = (0.25, 0.25);
self.ChangeStat(STAT_MISC);
}
}
class RedneckBlood : DukeBlood
{
override void Initialize()
{
Super.Initialize();
self.scale = (0.0625, 0.0625);
self.pos.Z -= 26;
}
}
class DukeMike : DukeActor
{
default
{
pic "MIKE";
}
override void Initialize()
{
self.yint = self.hitag;
self.ChangeStat(STAT_ACTOR);
}
}
class DukeWhispySmoke : DukeActor
{
default
@ -193,7 +32,6 @@ class DukeWhispySmoke : DukeActor
self.ChangeStat(STAT_MISC);
}
}
class DukeLavaSplash : DukeActor
{
default
@ -202,19 +40,4 @@ class DukeLavaSplash : DukeActor
}
}
class DukeSeriousSam : DukeActor
{
default
{
pic "SERIOUSSAM";
statnum STAT_ZOMBIEACTOR;
}
override void Initialize()
{
self.cstat |= CSTAT_SPRITE_BLOCK_ALL;
self.extra = 150;
self.ChangeStat(STAT_ZOMBIEACTOR);
}
}

View file

@ -1,27 +1,5 @@
class DukeItemBase : DukeActor
{
override void Initialize()
{
commonItemSetup();
}
}
class DukeCrystalAmmo : DukeItemBase
{
default
{
pic "CRYSTALAMMO";
+NOFLOORPAL;
}
override bool animate(tspritetype t)
{
t.shade = int(Raze.BobVal(PlayClock << 4) * 16);
return false;
}
}
class DukeFlamethrowerSprite : DukeItemBase
{
default
@ -38,235 +16,3 @@ class DukeFlamethrowerAmmo : DukeItemBase
}
}
class DukeSteroids : DukeItemBase
{
default
{
pic "STEROIDS";
+INVENTORY;
}
}
class DukeHeatSensor : DukeItemBase
{
default
{
pic "HEATSENSOR";
+INVENTORY;
}
}
class DukeShield : DukeItemBase
{
default
{
pic "SHIELD";
}
}
class DukeAirtank : DukeItemBase
{
default
{
pic "AIRTANK";
+INVENTORY;
}
}
class DukeTripbombSprite : DukeItemBase
{
default
{
pic "TRIPBOMBSPRITE";
}
}
class DukeJetpack : DukeItemBase
{
default
{
pic "JETPACK";
+INVENTORY;
}
}
class DukeHoloDuke : DukeItemBase
{
default
{
pic "HOLODUKE";
+INVENTORY;
}
}
class DukeFirstgunSprite : DukeItemBase
{
default
{
pic "FIRSTGUNSPRITE";
}
}
class DukeShotgunSprite : DukeItemBase
{
default
{
pic "SHOTGUNSPRITE";
}
}
class DukeChaingunSprite : DukeItemBase
{
default
{
pic "CHAINGUNSPRITE";
}
}
class DukeRPGSprite : DukeItemBase
{
default
{
pic "RPGSPRITE";
}
}
class DukeShrinkerSprite : DukeItemBase
{
default
{
pic "SHRINKERSPRITE";
}
}
class DukeFreezeSprite : DukeItemBase
{
default
{
pic "FREEZESPRITE";
}
}
class DukeDevastatorSprite : DukeItemBase
{
default
{
pic "DEVISTATORSPRITE";
}
}
class DukeShotgunammo : DukeItemBase
{
default
{
pic "SHOTGUNAMMO";
}
}
class DukeFreezeammo : DukeItemBase
{
default
{
pic "FREEZEAMMO";
}
}
class DukeHBombammo : DukeItemBase
{
default
{
pic "HBOMBAMMO";
}
}
class DukeGrowammo : DukeItemBase
{
default
{
pic "GROWAMMO";
}
}
class DukeDevastatorammo : DukeItemBase
{
default
{
pic "DEVISTATORAMMO";
}
}
class DukeRPGammo : DukeItemBase
{
default
{
pic "RPGAMMO";
}
}
class DukeAmmo : DukeItemBase
{
default
{
pic "AMMO";
}
override void Initialize()
{
commonItemSetup((0.25, 0.25));
}
}
class DukeBoots : DukeItemBase
{
default
{
pic "BOOTS";
+INVENTORY;
}
}
class DukeAmmoLots : DukeItemBase
{
default
{
pic "AMMOLOTS";
}
}
class DukeCola : DukeItemBase
{
default
{
pic "COLA";
}
}
class DukeFirstAid : DukeItemBase
{
default
{
pic "FIRSTAID";
+INVENTORY;
}
}
class DukeAccessCard : DukeItemBase
{
default
{
pic "ACCESSCARD";
}
override void Initialize()
{
if (ud.multimode > 1 && ud.coop != 1)
{
self.scale = (0, 0);
self.ChangeStat(STAT_MISC);
return;
}
self.Scale = (0.5, 0.5);
self.shade = -17;
if (!self.mapSpawned) self.ChangeStat(STAT_ACTOR);
else
{
self.ChangeStat(STAT_ZOMBIEACTOR);
self.makeitfall();
}
}
}

View file

@ -0,0 +1,356 @@
class DukeToiletWater : DukeActor
{
default
{
pic "TOILETWATER";
+FORCERUNCON;
+NOTELEPORT;
Strength 0;
}
override void Initialize()
{
self.shade = -16;
self.changeStat(STAT_STANDABLE);
}
}
//---------------------------------------------------------------------------
//
//
//
//---------------------------------------------------------------------------
class DukeExplosion2 : DukeActor
{
default
{
pic "EXPLOSION2";
+FULLBRIGHT;
+FORCERUNCON;
+TRIGGER_IFHITSECTOR;
Strength 1;
}
override bool animate(tspritetype t)
{
Duke.GetViewPlayer().visibility = -127;
Duke.setlastvisinc(32);
return false;
}
override void Initialize()
{
let owner = self.ownerActor;
if (owner && owner != self)
{
self.Angle = owner.Angle;
self.cstat = randomXFlip();
double c,f;
[c, f] = self.sector.getSlopes(self.pos.XY);
self.pos.Z = min(self.pos.Z, f - 12);
}
self.cstat |= CSTAT_SPRITE_YCENTER;
self.shade = -127;
self.Scale = (0.75, 0.75);
self.ChangeStat(STAT_MISC);
}
}
//---------------------------------------------------------------------------
//
//
//
//---------------------------------------------------------------------------
class DukeExplosion2Bot : DukeExplosion2
{
default
{
pic "EXPLOSION2BOT";
-TRIGGER_IFHITSECTOR;
}
}
//---------------------------------------------------------------------------
//
//
//
//---------------------------------------------------------------------------
class RedneckExplosion3 : DukeExplosion2
{
default
{
pic "EXPLOSION3";
}
override void Initialize()
{
Super.Initialize();
self.scale = (2, 2);
}
override bool animate(tspritetype t)
{
return false;
}
}
//---------------------------------------------------------------------------
//
//
//
//---------------------------------------------------------------------------
class DukeFloorFlame : DukeActor
{
default
{
pic "FLOORFLAME";
+FULLBRIGHT;
+FORCERUNCON;
Strength 0;
}
override void Initialize()
{
self.shade = -127;
self.ChangeStat(STAT_STANDABLE);
}
}
//---------------------------------------------------------------------------
//
//
//
//---------------------------------------------------------------------------
class DukeForceRipple : DukeActor
{
default
{
pic "FORCERIPPLE";
+FORCERUNCON;
Strength 0;
//StartAction "RIP_F";
}
}
//---------------------------------------------------------------------------
//
//
//
//---------------------------------------------------------------------------
class DukeTransporterStar : DukeActor
{
default
{
pic "TRANSPORTERSTAR";
+FORCERUNCON;
+NOTELEPORT;
Strength 0;
//StartAction "TRANSFOWARD";
}
override void Initialize()
{
let owner = self.ownerActor;
if (owner == nullptr || owner == self)
{
scale = (0, 0);
return;
}
if (owner.statnum == STAT_PROJECTILE)
{
self.scale = (0.125, 0.125);
}
else
{
self.scale = (0.75, 1);
if (owner.statnum == STAT_PLAYER || owner.badguy())
self.pos.Z -= 32;
}
self.cstat = CSTAT_SPRITE_YCENTER | CSTAT_SPRITE_TRANSLUCENT;
self.angle = owner.angle;
self.vel.X = 8;
self.DoMove(CLIPMASK0);
self.SetPosition(self.pos);
self.ChangeStat(STAT_MISC);
self.shade = -127;
}
}
//---------------------------------------------------------------------------
//
//
//
//---------------------------------------------------------------------------
class DukeTransporterBeam : DukeActor
{
default
{
pic "TRANSPORTERBEAM";
+FORCERUNCON;
+NOTELEPORT;
Strength 0;
}
override void Initialize()
{
let owner = self.ownerActor;
if (owner == nullptr || owner == self)
{
scale = (0, 0);
return;
}
self.scale = (0.484375, REPEAT_SCALE);
self.pos.Z = owner.sector.floorz - gs.playerheight;
self.cstat = CSTAT_SPRITE_YCENTER | CSTAT_SPRITE_TRANSLUCENT;
self.angle = owner.angle;
self.vel.X = 8;
self.DoMove(CLIPMASK0);
self.SetPosition(self.pos);
self.ChangeStat(STAT_MISC);
self.shade = -127;
}
}
//---------------------------------------------------------------------------
//
//
//
//---------------------------------------------------------------------------
class DukeSteamBase : DukeActor // we need this for in-game checking and the shared CON code.
{
default
{
statnum STAT_STANDABLE;
+FORCERUNCON;
Strength 0;
}
}
class DukeCeilingSteam : DukeSteamBase
{
default
{
pic "CEILINGSTEAM";
}
}
class DukeSteam : DukeSteamBase
{
default
{
pic "STEAM";
}
override void Initialize()
{
let owner = self.ownerActor;
if (owner && owner != self)
{
self.Angle = owner.Angle;
self.cstat = CSTAT_SPRITE_ALIGNMENT_WALL | CSTAT_SPRITE_YCENTER | CSTAT_SPRITE_TRANSLUCENT;
self.vel.X = -0.5;
self.doMove(CLIPMASK0);
}
self.scale = (REPEAT_SCALE, REPEAT_SCALE);
self.ChangeStat(STAT_STANDABLE);
}
}
//---------------------------------------------------------------------------
//
//
//
//---------------------------------------------------------------------------
class DukeSmallSmoke : DukeActor
{
default
{
pic "SMALLSMOKE";
+FORCERUNCON;
Strength 0;
}
override void Initialize()
{
let owner = self.ownerActor;
if (owner && owner != self)
{
self.Angle = owner.Angle;
self.cstat = randomXFlip();
double c,f;
[c, f] = self.sector.getSlopes(self.pos.XY);
self.pos.Z = min(self.pos.Z, f - 12);
}
self.scale = (0.375, 0.375);
self.ChangeStat(STAT_MISC);
}
}
//---------------------------------------------------------------------------
//
//
//
//---------------------------------------------------------------------------
class DukeBlood : DukeActor
{
default
{
pic "BLOOD";
+FORCERUNCON;
Strength 0;
}
override void Initialize()
{
self.pos.Z -= 26;
if (!mapSpawned && self.ownerActor && self.ownerActor.pal == 6)
self.pal = 6;
self.scale = (0.25, 0.25);
temp_pos.Z = 72 * REPEAT_SCALE;
self.ChangeStat(STAT_MISC);
}
}
class RedneckBlood : DukeBlood
{
override void Initialize()
{
Super.Initialize();
self.scale = (0.0625, 0.0625);
temp_pos.Z = 48 * REPEAT_SCALE;
}
}

View file

@ -0,0 +1,184 @@
class DukeFemBase : DukeActor
{
meta int femflags;
property femflags: femflags;
default
{
+TRIGGERRESPAWN;
+HITRADIUSCHECK;
//StartAction "FEMANIMATE";
Strength TOUGH;
}
const GROWSCRAP = 1;
const SLOWANIM = 2;
const TOUGHANIM = 4;
const TIPME = 8;
const KILLME = 16;
const FEMDANCE = 32;
const FREEZEANIM2 = 64;
}
class DukeBloodyPole : DukeFemBase
{
default
{
pic "BLOODYPOLE";
-TRIGGERRESPAWN;
-HITRADIUSCHECK;
StartAction 'none';
}
override void Initialize()
{
self.cstat |= CSTAT_SPRITE_BLOCK_ALL;
self.clipdist = 8;
self.ChangeStat(STAT_ZOMBIEACTOR);
}
}
class DukeFemale1 : DukeFemBase
{
default
{
pic "FEM1";
DukeFemBase.femflags TIPME | FEMDANCE;
}
}
class DukeFemale2 : DukeFemBase
{
default
{
pic "FEM2";
DukeFemBase.femflags TIPME;
}
}
class DukeFemale3 : DukeFemBase
{
default
{
pic "FEM3";
DukeFemBase.femflags TIPME;
}
}
class DukeFemale4 : DukeFemBase
{
default
{
pic "FEM4";
}
}
class DukeFemale5 : DukeFemBase
{
default
{
pic "FEM5";
DukeFemBase.femflags FREEZEANIM2 | KILLME;
}
}
class DukeFemale6 : DukeFemBase
{
default
{
pic "FEM6";
+NOGRAVITY;
DukeFemBase.femflags FREEZEANIM2 | KILLME;
}
}
class DukeFemale7 : DukeFemBase
{
default
{
pic "FEM7";
DukeFemBase.femflags TIPME;
}
}
class DukeFemale8 : DukeFemBase
{
default
{
pic "FEM8";
DukeFemBase.femflags FREEZEANIM2;
}
}
class DukeFemale9 : DukeFemBase
{
default
{
pic "FEM9";
DukeFemBase.femflags FREEZEANIM2;
}
}
class DukeFemale10 : DukeFemBase
{
default
{
pic "FEM10";
DukeFemBase.femflags SLOWANIM | FREEZEANIM2 | TIPME;
}
}
class DukeNaked : DukeFemBase
{
default
{
pic "NAKED1";
-HITRADIUSCHECK;
+NOGRAVITY;
DukeFemBase.femflags GROWSCRAP | FREEZEANIM2 | KILLME;
}
}
class DukeToughGal : DukeFemBase
{
const MANWOMANSTRENGTH = 100;
default
{
pic "TOUGHGAL";
-HITRADIUSCHECK;
Strength MANWOMANSTRENGTH;
DukeFemBase.femflags TOUGHANIM | FREEZEANIM2;
}
}
class DukePodFemale : DukeFemBase
{
default
{
pic "PODFEM1";
DukeFemBase.femflags GROWSCRAP | FREEZEANIM2 | KILLME;
}
}
class DukeFem6Pad: DukeActor
{
default
{
pic "FEM6PAD";
}
}

View file

@ -0,0 +1,97 @@
class DukeBurning : DukeActor
{
default
{
pic "BURNING";
+FULLBRIGHT;
+FORCERUNCON;
+NOTELEPORT;
+NOFLOORPAL;
Strength WEAK;
}
override void Initialize()
{
if (!self.mapSpawned)
{
double c,f;
[c, f] = self.sector.getSlopes(self.pos.XY);
self.pos.Z = min(self.pos.Z, f - 12);
}
self.Scale = (0.0625, 0.0625);
self.ChangeStat(STAT_MISC);
}
override bool animate(tspritetype t)
{
let OwnerAc = self.ownerActor;
if (OwnerAc && OwnerAc.statnum == STAT_PLAYER)
{
let p = Duke.GetViewPlayer();
if (display_mirror == 0 && OwnerAc == p.actor && p.over_shoulder_on == 0)
t.scale = (0, 0);
else
{
// not needed.
//t.Angle = (viewVec - t.pos.XY()).Angle();
//t.pos.XY = OwnerAc.pos.XY + t.Angle.ToVector();
}
}
t.cstat |= CSTAT_SPRITE_YCENTER;
double d;
if (!bNOFLOORFIRE)
[d, t.pos.Z] = t.sector.getSlopes(t.pos.XY);
return false;
}
}
class DukeBurning2 : DukeBurning
{
default
{
pic "BURNING2";
}
}
class RedneckFire : DukeActor
{
default
{
pic "FIRE";
+FULLBRIGHT;
+NOTELEPORT;
+NOFLOORPAL;
Strength WEAK;
}
override bool animate(tspritetype t)
{
let OwnerAc = self.ownerActor;
double d;
[d, t.pos.Z] = t.sector.getSlopes(t.pos.XY);
return false;
}
}
class DukeFire : RedneckFire
{
override bool animate(tspritetype t)
{
super.animate(t);
t.cstat |= CSTAT_SPRITE_YCENTER;
return false;
}
}
class DukeFire2 : DukeFire
{
default
{
pic "FIRE2";
}
}

View file

@ -0,0 +1,340 @@
class DukeItemBase : DukeActor
{
const PISTOLAMMOAMOUNT = 12;
const SHOTGUNAMMOAMOUNT = 10;
const CHAINGUNAMMOAMOUNT = 50;
const RPGAMMOBOX = 5;
const CRYSTALAMMOAMOUNT = 5;
const GROWCRYSTALAMMOAMOUNT = 20;
const DEVISTATORAMMOAMOUNT = 15;
const FREEZEAMMOAMOUNT = 25;
const FLAMETHROWERAMMOAMOUNT = 25;
const HANDBOMBBOX = 5;
const PIG_SHIELD_AMOUNT1 = 75;
const PIG_SHIELD_AMOUNT2 = 50;
const MAXPLAYERATOMICHEALTH = 200;
override void Initialize()
{
commonItemSetup();
}
}
class DukeSteroids : DukeItemBase
{
default
{
pic "STEROIDS";
+INVENTORY;
}
}
class DukeBoots : DukeItemBase
{
default
{
pic "BOOTS";
+INVENTORY;
}
}
class DukeHeatSensor : DukeItemBase
{
default
{
pic "HEATSENSOR";
+INVENTORY;
}
}
class DukeShield : DukeItemBase
{
default
{
pic "SHIELD";
}
}
class DukeAirtank : DukeItemBase
{
default
{
pic "AIRTANK";
+INVENTORY;
}
}
class DukeHoloDuke : DukeItemBase
{
default
{
pic "HOLODUKE";
+INVENTORY;
Strength 0;
}
}
class DukeJetpack : DukeItemBase
{
default
{
pic "JETPACK";
+INVENTORY;
}
}
class DukeAccessCard : DukeItemBase
{
default
{
pic "ACCESSCARD";
}
override void Initialize()
{
if (ud.multimode > 1 && ud.coop != 1)
{
self.scale = (0, 0);
self.ChangeStat(STAT_MISC);
return;
}
self.scale = (0.5, 0.5);
self.shade = -17;
if (!self.mapSpawned) self.ChangeStat(STAT_ACTOR);
else
{
self.ChangeStat(STAT_ZOMBIEACTOR);
self.makeitfall();
}
}
}
class DukeAmmo : DukeItemBase
{
default
{
pic "AMMO";
}
override void Initialize()
{
commonItemSetup((0.25, 0.25));
}
}
class DukeFreezeammo : DukeItemBase
{
default
{
pic "FREEZEAMMO";
}
}
class DukeShotgunammo : DukeItemBase
{
default
{
pic "SHOTGUNAMMO";
}
}
class DukeAmmoLots : DukeItemBase
{
default
{
pic "AMMOLOTS";
}
}
class DukeCrystalAmmo : DukeItemBase
{
default
{
pic "CRYSTALAMMO";
+NOFLOORPAL;
}
override bool animate(tspritetype t)
{
t.shade = int(Raze.BobVal(PlayClock << 4) * 16);
return false;
}
}
class DukeGrowammo : DukeItemBase
{
default
{
pic "GROWAMMO";
}
}
class DukeBatteryAmmo : DukeItemBase
{
default
{
pic "BATTERYAMMO";
}
override void Initialize()
{
commonItemSetup();
}
}
class DukeDevastatorammo : DukeItemBase
{
default
{
pic "DEVISTATORAMMO";
}
}
class DukeRPGammo : DukeItemBase
{
default
{
pic "RPGAMMO";
}
}
class DukeHBombammo : DukeItemBase
{
default
{
pic "HBOMBAMMO";
}
}
class DukeRPGSprite : DukeItemBase
{
default
{
pic "RPGSPRITE";
}
}
class DukeShotgunSprite : DukeItemBase
{
default
{
pic "SHOTGUNSPRITE";
}
}
class DukeSixpak : DukeItemBase
{
default
{
pic "SIXPAK";
}
}
class DukeCola : DukeItemBase
{
default
{
pic "COLA";
}
}
class DukeAtomicHealth : DukeItemBase
{
default
{
pic "ATOMICHEALTH";
+FULLBRIGHT;
+BIGHEALTH;
+NOFLOORPAL;
}
override void Initialize()
{
commonItemSetup();
self.cstat |= CSTAT_SPRITE_YCENTER;
}
override bool animate(tspritetype t)
{
t.pos.Z -= 4;
return false;
}
}
class DukeFirstAid : DukeItemBase
{
default
{
pic "FIRSTAID";
+INVENTORY;
}
}
class DukeFirstgunSprite : DukeItemBase
{
default
{
pic "FIRSTGUNSPRITE";
}
}
class DukeTripbombSprite : DukeItemBase
{
default
{
pic "TRIPBOMBSPRITE";
}
}
class DukeChaingunSprite : DukeItemBase
{
default
{
pic "CHAINGUNSPRITE";
}
}
class DukeShrinkerSprite : DukeItemBase
{
default
{
pic "SHRINKERSPRITE";
}
}
class DukeFreezeSprite : DukeItemBase
{
default
{
pic "FREEZESPRITE";
}
}
class DukeDevastatorSprite : DukeItemBase
{
default
{
pic "DEVISTATORSPRITE";
}
}

View file

@ -0,0 +1,72 @@
class DukePlayerPawn : DukePlayerBase
{
default
{
Strength MAXPLAYERHEALTH;
}
}
class DukePlayerOnWater : DukeActor
{
default
{
pic "PLAYERONWATER";
+ALWAYSROTATE1;
}
override void Initialize()
{
if (!mapSpawned && self.ownerActor)
{
self.scale = self.ownerActor.scale;
self.vel.Z = 0.5;
if (self.sector.lotag != ST_2_UNDERWATER)
self.cstat |= CSTAT_SPRITE_INVISIBLE;
}
self.ChangeStat(STAT_DUMMYPLAYER);
}
override void OnHit(DukeActor proj)
{
// propagate the hit to its owner.
let owner = self.ownerActor;
if (owner && self != owner) owner.OnHit(proj);
}
}
class DukePlayerLyingDead : DukeActor
{
default
{
pic "DUKELYINGDEAD";
+HITRADIUS_FORCEEFFECT;
Strength 0;
}
override void Initialize()
{
let owner = self.ownerActor;
if (owner && owner.isPlayer())
{
self.scale = owner.scale;
self.shade = owner.shade;
self.pal = owner.GetPlayer().palookup;
}
self.vel.X = 292 / 16.;
self.vel.Z = 360 / 256.;
self.cstat = CSTAT_SPRITE_BLOCK_ALL;
self.extra = 1;
self.clipdist = 32;
self.ChangeStat(STAT_ACTOR);
}
override bool animate(tspritetype t)
{
t.pos.Z += 24;
return false;
}
}

View file

@ -0,0 +1,24 @@
class DukeRubberCan : DukeActor
{
default
{
pic "RUBBERCAN";
Strength WEAK;
+FORCERUNCON;
+CHECKSLEEP;
+MOVEFTA_MAKESTANDABLE;
}
override void Initialize()
{
if (!self.mapSpawned)
self.scale = (0.5, 0.5);
self.cstat = CSTAT_SPRITE_BLOCK_ALL | randomXFlip();
self.clipdist = 18;
self.ChangeStat(STAT_ZOMBIEACTOR);
self.extra = 0;
}
}

View file

@ -0,0 +1,376 @@
class DukeSimpleItem : DukeActor
{
default
{
+FORCERUNCON;
+CHECKSLEEP;
+MOVEFTA_MAKESTANDABLE;
}
override void Initialize()
{
if (!self.mapSpawned)
self.scale = (0.5, 0.5);
self.cstat = CSTAT_SPRITE_BLOCK_ALL | randomXFlip();
self.clipdist = 18;
self.ChangeStat(STAT_ZOMBIEACTOR);
}
}
//---------------------------------------------------------------------------
//
//
//
//---------------------------------------------------------------------------
class DukeExplodingBarrel : DukeSimpleItem
{
default
{
pic "EXPLODINGBARREL";
+DOUBLEDMGTHRUST;
+BREAKMIRRORS;
Strength 26;
}
}
//---------------------------------------------------------------------------
//
//
//
//---------------------------------------------------------------------------
class DukeWoodenHorse : DukeSimpleItem
{
default
{
pic "WOODENHORSE";
Strength WEAKEST;
}
}
//---------------------------------------------------------------------------
//
//
//
//---------------------------------------------------------------------------
class DukeHorseOnSide : DukeWoodenHorse
{
default
{
pic "HORSEONSIDE";
}
}
//---------------------------------------------------------------------------
//
//
//
//---------------------------------------------------------------------------
class DukeWaterbubbleMaker : DukeSimpleItem
{
default
{
pic "WATERBUBBLEMAKER";
+FORCERUNCON;
Strength 0;
}
override void Initialize()
{
self.hitag = 0;
self.cstat |= CSTAT_SPRITE_INVISIBLE;
self.ChangeStat(STAT_STANDABLE);
}
}
//---------------------------------------------------------------------------
//
//
//
//---------------------------------------------------------------------------
class DukeWaterBubble : DukeActor
{
default
{
pic "WATERBUBBLE";
+FORCERUNCON;
+NOFLOORPAL;
Strength 0;
}
override void Initialize()
{
let owner = self.ownerActor;
if (owner && owner.isPlayer())
self.pos.Z -= 16;
if (owner != self)
self.angle = owner.angle;
self.scale = (0.0625, 0.0625);
self.ChangeStat(STAT_MISC);
}
override bool animate(tspritetype t)
{
if (dlevel.floorsurface(t.sector) == Duke.TSURF_SLIME)
{
t.pal = 7;
}
else
{
t.copyfloorpal(t.sector);
}
return false;
}
}
//---------------------------------------------------------------------------
//
//
//
//---------------------------------------------------------------------------
class DukeNukeBarrel : DukeSimpleItem
{
default
{
pic "NUKEBARREL";
+GREENBLOOD;
Strength MEDIUMSTRENGTH;
}
}
//---------------------------------------------------------------------------
//
//
//
//---------------------------------------------------------------------------
class DukeNukeBarrelDented : DukeNukeBarrel
{
default
{
pic "NUKEBARRELDENTED";
}
}
//---------------------------------------------------------------------------
//
//
//
//---------------------------------------------------------------------------
class DukeNukeBarrelLeaked : DukeNukeBarrel
{
default
{
pic "NUKEBARRELLEAKED";
}
}
//---------------------------------------------------------------------------
//
//
//
//---------------------------------------------------------------------------
class DukeFireBarrel : DukeSimpleItem
{
default
{
pic "FIREBARREL";
}
}
//---------------------------------------------------------------------------
//
//
//
//---------------------------------------------------------------------------
class DukeFireVase : DukeFireBarrel
{
default
{
pic "FIREVASE";
}
}
//---------------------------------------------------------------------------
//
//
//
//---------------------------------------------------------------------------
class DukeFeces : DukeActor
{
default
{
pic "FECES";
+FORCERUNCON;
+BROWNBLOOD;
}
override void Initialize()
{
if (!mapSpawned)
self.scale = (REPEAT_SCALE, REPEAT_SCALE);
self.ChangeStat(STAT_MISC);
}
}
//---------------------------------------------------------------------------
//
//
//
//---------------------------------------------------------------------------
class DukeStatue : DukeActor
{
default
{
pic "STATUE";
+TRIGGERRESPAWN;
+HITRADIUSCHECK;
}
override void Initialize()
{
self.clipdist = 32;
self.cstat |= CSTAT_SPRITE_BLOCK_ALL;
}
override void OnHit(DukeActor proj)
{
self.lotsofcolourglass(40);
self.PlayActorSound("GLASS_HEAVYBREAK");
self.angle = frandom(0, 360);
self.lotsofglass(8);
self.Destroy();
}
}
//---------------------------------------------------------------------------
//
//
//
//---------------------------------------------------------------------------
class DukeStatueFlash : DukeStatue
{
default
{
pic "STATUEFLASH";
}
}
//---------------------------------------------------------------------------
//
//
//
//---------------------------------------------------------------------------
class DukeMike : DukeActor
{
default
{
pic "MIKE";
}
override void Initialize()
{
self.yint = self.hitag;
self.ChangeStat(STAT_ACTOR);
}
}
//---------------------------------------------------------------------------
//
//
//
//---------------------------------------------------------------------------
class DukeHotMeat : DukeActor // HOTMEAT (4427)
{
default
{
pic "HOTMEAT";
Strength TOUGH;
}
}
//---------------------------------------------------------------------------
//
//
//
//---------------------------------------------------------------------------
class DukeSpeaker : DukeActor
{
default
{
pic "SPEAKER";
+NOFALLER;
}
}
//---------------------------------------------------------------------------
//
//
//
//---------------------------------------------------------------------------
class DukeWaterdripSplash : DukeActor
{
default
{
pic "WATERDRIPSPLASH";
}
override void Initialize()
{
self.scale = (0.375, 0.375);
self.ChangeStat(STAT_STANDABLE);
}
}
//---------------------------------------------------------------------------
//
//
//
//---------------------------------------------------------------------------
class DukeSeriousSam : DukeActor
{
default
{
pic "SERIOUSSAM";
statnum STAT_ZOMBIEACTOR;
}
override void Initialize()
{
self.cstat |= CSTAT_SPRITE_BLOCK_ALL;
self.extra = 150;
self.ChangeStat(STAT_ZOMBIEACTOR);
}
}

View file

@ -1,64 +0,0 @@
class DukeExplosion2 : DukeActor
{
default
{
pic "EXPLOSION2";
+FULLBRIGHT;
+FORCERUNCON;
+TRIGGER_IFHITSECTOR;
}
override bool animate(tspritetype t)
{
Duke.GetViewPlayer().visibility = -127;
Duke.setlastvisinc(32);
return false;
}
override void Initialize()
{
let owner = self.ownerActor;
if (owner && owner != self)
{
self.Angle = owner.Angle;
self.cstat = randomXFlip();
double c,f;
[c, f] = self.sector.getSlopes(self.pos.XY);
self.pos.Z = min(self.pos.Z, f - 12);
}
self.cstat |= CSTAT_SPRITE_YCENTER;
self.shade = -127;
self.Scale = (0.75, 0.75);
self.ChangeStat(STAT_MISC);
}
}
class DukeExplosion2Bot : DukeExplosion2
{
default
{
pic "EXPLOSION2BOT";
-TRIGGER_IFHITSECTOR;
}
}
class RedneckExplosion3 : DukeExplosion2
{
default
{
pic "EXPLOSION3";
}
override void Initialize()
{
Super.Initialize();
self.scale = (2, 2);
}
override bool animate(tspritetype t)
{
return false;
}
}

View file

@ -1,130 +0,0 @@
class DukeBloodyPole : DukeActor
{
default
{
pic "BLOODYPOLE";
}
override void Initialize()
{
self.cstat |= CSTAT_SPRITE_BLOCK_ALL;
self.clipdist = 8;
self.ChangeStat(STAT_ZOMBIEACTOR);
}
}
class DukeFemale1 : DukeBloodyPole
{
default
{
pic "FEM1";
+TRIGGERRESPAWN;
+HITRADIUSCHECK;
}
}
class DukeFemale2 : DukeFemale1
{
default
{
pic "FEM2";
}
}
class DukeFemale3 : DukeFemale1
{
default
{
pic "FEM3";
}
}
class DukeFemale4 : DukeFemale1
{
default
{
pic "FEM4";
}
}
class DukeFemale5 : DukeFemale1
{
default
{
pic "FEM5";
}
}
class DukeFemale6 : DukeFemale1
{
default
{
pic "FEM6";
}
}
class DukeFemale7 : DukeFemale1
{
default
{
pic "FEM7";
}
}
class DukeFemale8 : DukeFemale1
{
default
{
pic "FEM8";
}
}
class DukeFemale9 : DukeFemale1
{
default
{
pic "FEM9";
}
}
class DukeFemale10 : DukeFemale1
{
default
{
pic "FEM10";
}
}
class DukeNaked : DukeFemale1
{
default
{
pic "NAKED1";
-HITRADIUSCHECK;
}
}
class DukeToughGal : DukeFemale1
{
default
{
pic "TOUGHGAL";
-HITRADIUSCHECK;
}
}
class DukePodFemale : DukeFemale1
{
default
{
pic "PODFEM1";
}
override void Initialize()
{
Super.Initialize();
self.extra <<= 1;
}
}

View file

@ -7,70 +7,6 @@ class DukePlayerBase : DukeActor
}
}
class DukePlayerPawn : DukePlayerBase
{
}
class DukePlayerOnWater : DukeActor
{
default
{
pic "PLAYERONWATER";
+ALWAYSROTATE1;
}
override void Initialize()
{
if (!mapSpawned && self.ownerActor)
{
self.scale = self.ownerActor.scale;
self.vel.Z = 0.5;
if (self.sector.lotag != ST_2_UNDERWATER)
self.cstat |= CSTAT_SPRITE_INVISIBLE;
}
self.ChangeStat(STAT_DUMMYPLAYER);
}
override void OnHit(DukeActor proj)
{
// propagate the hit to its owner.
let owner = self.ownerActor;
if (owner && self != owner) owner.OnHit(proj);
}
}
class DukePlayerLyingDead : DukeActor
{
default
{
pic "DUKELYINGDEAD";
+HITRADIUS_FORCEEFFECT;
}
override void Initialize()
{
let owner = self.ownerActor;
if (owner && owner.isPlayer())
{
self.scale = owner.scale;
self.shade = owner.shade;
self.pal = owner.GetPlayer().palookup;
}
self.vel.X = 292 / 16.;
self.vel.Z = 360 / 256.;
self.cstat = CSTAT_SPRITE_BLOCK_ALL;
self.extra = 1;
self.clipdist = 32;
self.ChangeStat(STAT_ACTOR);
}
override bool animate(tspritetype t)
{
t.pos.Z += 24;
return false;
}
}
class RedneckPlayerLyingDead : DukeActor
{

View file

@ -1,11 +1,3 @@
class DukeSixpak : DukeItemBase
{
default
{
pic "SIXPAK";
}
}
class RedneckPorkRinds : DukeItemBase
{
default

View file

@ -1,26 +0,0 @@
class DukeSmallSmoke : DukeActor
{
default
{
pic "SMALLSMOKE";
+FORCERUNCON;
}
override void Initialize()
{
let owner = self.ownerActor;
if (owner && owner != self)
{
self.Angle = owner.Angle;
self.cstat = randomXFlip();
double c,f;
[c, f] = self.sector.getSlopes(self.pos.XY);
self.pos.Z = min(self.pos.Z, f - 12);
}
self.scale = (0.375, 0.375);
self.ChangeStat(STAT_MISC);
}
}

View file

@ -1,41 +0,0 @@
class DukeSteamBase : DukeActor // we need this for in-game checking and the shared CON code.
{
default
{
statnum STAT_STANDABLE;
+FORCERUNCON;
}
}
class DukeCeilingSteam : DukeSteamBase
{
default
{
pic "CEILINGSTEAM";
}
}
class DukeSteam : DukeSteamBase
{
default
{
pic "STEAM";
+FORCERUNCON;
}
override void Initialize()
{
let owner = self.ownerActor;
if (owner && owner != self)
{
self.Angle = owner.Angle;
self.cstat = CSTAT_SPRITE_ALIGNMENT_WALL | CSTAT_SPRITE_YCENTER | CSTAT_SPRITE_TRANSLUCENT;
self.vel.X = -0.5;
self.doMove(CLIPMASK0);
}
self.scale = (REPEAT_SCALE, REPEAT_SCALE);
self.ChangeStat(STAT_STANDABLE);
}
}

View file

@ -1,15 +0,0 @@
class DukeToiletWater : DukeActor
{
default
{
pic "TOILETWATER";
+FORCERUNCON;
+NOTELEPORT;
}
override void Initialize()
{
self.shade = -16;
self.changeStat(STAT_STANDABLE);
}
}

View file

@ -1,72 +0,0 @@
class DukeTransporterStar : DukeActor
{
default
{
pic "TRANSPORTERSTAR";
+FORCERUNCON;
+NOTELEPORT;
}
override void Initialize()
{
let owner = self.ownerActor;
if (owner == nullptr || owner == self)
{
scale = (0, 0);
return;
}
if (owner.statnum == STAT_PROJECTILE)
{
self.scale = (0.125, 0.125);
}
else
{
self.scale = (0.75, 1);
if (owner.statnum == STAT_PLAYER || owner.badguy())
self.pos.Z -= 32;
}
self.cstat = CSTAT_SPRITE_YCENTER | CSTAT_SPRITE_TRANSLUCENT;
self.angle = owner.angle;
self.vel.X = 8;
self.DoMove(CLIPMASK0);
self.SetPosition(self.pos);
self.ChangeStat(STAT_MISC);
self.shade = -127;
}
}
class DukeTransporterBeam : DukeActor
{
default
{
pic "TRANSPORTERBEAM";
+FORCERUNCON;
+NOTELEPORT;
}
override void Initialize()
{
let owner = self.ownerActor;
if (owner == nullptr || owner == self)
{
scale = (0, 0);
return;
}
self.scale = (0.484375, REPEAT_SCALE);
self.pos.Z = owner.sector.floorz - gs.playerheight;
self.cstat = CSTAT_SPRITE_YCENTER | CSTAT_SPRITE_TRANSLUCENT;
self.angle = owner.angle;
self.vel.X = 8;
self.DoMove(CLIPMASK0);
self.SetPosition(self.pos);
self.ChangeStat(STAT_MISC);
self.shade = -127;
}
}

View file

@ -1,36 +0,0 @@
class DukeWaterBubble : DukeActor
{
default
{
pic "WATERBUBBLE";
+FORCERUNCON;
+NOFLOORPAL;
}
override void Initialize()
{
let owner = self.ownerActor;
if (owner && owner.isPlayer())
self.pos.Z -= 16;
if (owner != self)
self.angle = owner.angle;
self.scale = (0.0625, 0.0625);
self.ChangeStat(STAT_MISC);
}
override bool animate(tspritetype t)
{
if (dlevel.floorsurface(t.sector) == Duke.TSURF_SLIME)
{
t.pal = 7;
}
else
{
t.copyfloorpal(t.sector);
}
return false;
}
}