raze/wadsrc/static/zscript/games/duke/dukeactor.zs

113 lines
3 KiB
Text
Raw Normal View History

class DukeActor : CoreActor native
{
enum EStatnums
{
STAT_DEFAULT = 0,
STAT_ACTOR = 1,
STAT_ZOMBIEACTOR = 2,
STAT_EFFECTOR = 3,
STAT_PROJECTILE = 4,
STAT_MISC = 5,
STAT_STANDABLE = 6,
STAT_LOCATOR = 7,
STAT_ACTIVATOR = 8,
STAT_TRANSPORT = 9,
STAT_PLAYER = 10,
STAT_FX = 11,
STAT_FALLER = 12,
STAT_DUMMYPLAYER = 13,
STAT_LIGHT = 14,
STAT_RAROR = 15,
STAT_DESTRUCT = 100,
STAT_BOWLING = 105,
};
2022-01-26 21:51:36 +00:00
native void SetSpritesetImage(int index);
native DukeActor ownerActor, hitOwnerActor;
native uint8 cgg;
native uint8 spriteextra; // moved here for easier maintenance. This was originally a hacked in field in the sprite structure called 'filler'.
2022-09-11 22:11:44 +00:00
native int16 /*attackertype, hitang,*/ hitextra, movflag;
native int16 tempval; /*, dispicnum;*/
native int16 timetosleep;
native double floorz, ceilingz;
native int saved_ammo;
native int palvals;
native int temp_data[6];
native private int flags1, flags2;
native walltype temp_walls[2];
native sectortype temp_sect, actorstayput;
native DukeActor temp_actor, seek_actor;
flagdef Inventory: flags1, 0;
flagdef ShrinkAutoaim: flags1, 1;
flagdef Badguy: flags1, 2;
flagdef ForceAutoaim: flags1, 3;
flagdef Boss: flags1, 4;
flagdef Badguystayput: flags1, 5;
flagdef GreenSlimeFood: flags1, 6;
flagdef NoDamagePush: flags1, 7;
flagdef NoWaterDrip: flags1, 8;
flagdef InternalBadguy: flags1, 9;
flagdef Killcount: flags1, 10;
flagdef NoCanSeeCheck: flags1, 11;
flagdef HitRadiusCheck: flags1, 12;
flagdef MoveFTA_CheckSee: flags1, 13;
flagdef MoveFTA_MakeStandable: flags1, 14;
flagdef TriggerIfHitSector: flags1, 15;
//flagdef MoveFTA_WakeupCheck: flags1, 16; // this one needs to be auto-set for RR, not for Duke, should not be exposed unless the feature becomes generally available.
flagdef CheckSeeWithPal8: flags1, 17;
flagdef NoShadow: flags1, 18;
flagdef SE24_NoFloorCheck: flags1, 19;
flagdef NoInterpolate: flags1, 20;
native void getglobalz();
native DukePlayer findplayer();
native int ifhitbyweapon();
native int domove(int clipmask);
native void PlayActorSound(int snd);
virtual void BeginPlay() {}
virtual void Initialize() {}
virtual void Tick() {}
2022-01-17 23:30:43 +00:00
virtual void onHit(DukeActor hitter) {}
2022-01-19 17:52:52 +00:00
virtual bool animate(tspritetype tspr) { return false; }
virtual void RunState() {} // this is the CON function.
}
extend struct _
{
native DukeLevel dlevel;
}
// The level struct is a wrapper to group all level related global variables and static functions into one object.
// On the script side we do not really want scattered global data that is publicly accessible.
struct DukeLevel
{
}
struct DukeStatIterator
{
private DukeActor nextp;
native DukeActor Next();
native DukeActor First(int stat);
}
struct DukeSectIterator
{
private DukeActor nextp;
native DukeActor Next();
native DukeActor First(sectortype sect);
}
struct DukeSpriteIterator
{
private DukeActor nextp;
private int stat;
native DukeActor Next();
native DukeActor First();
}