- Duke: Rename player_struct struct to DukePlayer.

This commit is contained in:
Mitchell Richters 2023-10-02 15:41:13 +11:00
parent 0ed54ed719
commit bd9e42bb40
31 changed files with 366 additions and 366 deletions

View file

@ -212,7 +212,7 @@ void RANDOMSCRAP(DDukeActor* origin)
//
//---------------------------------------------------------------------------
void addammo(int weapon, player_struct* player, int amount)
void addammo(int weapon, DukePlayer* player, int amount)
{
player->ammo_amount[weapon] += amount;
@ -226,7 +226,7 @@ void addammo(int weapon, player_struct* player, int amount)
//
//---------------------------------------------------------------------------
void checkavailinven(player_struct* player)
void checkavailinven(DukePlayer* player)
{
if (player->firstaid_amount > 0)
@ -252,7 +252,7 @@ void checkavailinven(player_struct* player)
//
//---------------------------------------------------------------------------
void checkavailweapon(player_struct* player)
void checkavailweapon(DukePlayer* player)
{
int i, snum;
int weap;
@ -328,7 +328,7 @@ void checkavailweapon(player_struct* player)
//
//---------------------------------------------------------------------------
void clearcamera(player_struct* ps)
void clearcamera(DukePlayer* ps)
{
ps->newOwner = nullptr;
ps->GetActor()->restoreloc();

View file

@ -49,7 +49,7 @@ BEGIN_DUKE_NS
//
//---------------------------------------------------------------------------
void addweapon_d(player_struct *p, int weapon, bool wswitch)
void addweapon_d(DukePlayer *p, int weapon, bool wswitch)
{
if ( p->gotweapon[weapon] == 0 )
{

View file

@ -453,7 +453,7 @@ void moveminecart(void)
void thunder(void)
{
player_struct* p;
DukePlayer* p;
int r1, r2;
int i = 0;
uint8_t shade;

View file

@ -42,7 +42,7 @@ void moveminecart();
//
//---------------------------------------------------------------------------
void addweapon_r(player_struct* p, int weapon, bool wswitch)
void addweapon_r(DukePlayer* p, int weapon, bool wswitch)
{
int cw = p->curr_weapon;
if (p->OnMotorcycle || p->OnBoat)
@ -815,7 +815,7 @@ void moveeffectors_r(void) //STATNUM 3
//
//---------------------------------------------------------------------------
void fakebubbaspawn(DDukeActor *actor, player_struct* p)
void fakebubbaspawn(DDukeActor *actor, DukePlayer* p)
{
fakebubba_spawn++;
switch (fakebubba_spawn)

View file

@ -39,18 +39,18 @@ void activatebysector_r(sectortype* sect, DDukeActor* j);
void checksectors_d(int snum);
void checksectors_r(int snum);
void addweapon_d(player_struct* p, int weapon, bool wswitch);
void addweapon_r(player_struct* p, int weapon, bool wswitch);
void addweapon_d(DukePlayer* p, int weapon, bool wswitch);
void addweapon_r(DukePlayer* p, int weapon, bool wswitch);
int ifhitbyweapon_r(DDukeActor* sn);
int ifhitbyweapon_d(DDukeActor* sn);
void incur_damage_d(player_struct* p);
void incur_damage_r(player_struct* p);
void incur_damage_d(DukePlayer* p);
void incur_damage_r(DukePlayer* p);
void selectweapon_d(int snum, int j);
void selectweapon_r(int snum, int j);
int doincrements_d(player_struct* p);
int doincrements_r(player_struct* p);
void checkweapons_d(player_struct* p);
void checkweapons_r(player_struct* p);
int doincrements_d(DukePlayer* p);
int doincrements_r(DukePlayer* p);
void checkweapons_d(DukePlayer* p);
void checkweapons_r(DukePlayer* p);
void processinput_d(int snum);
void processinput_r(int snum);
void displayweapon_d(int snum, double interpfrac);

View file

@ -19,7 +19,7 @@
BEGIN_DUKE_NS
extern player_struct ps[MAXPLAYERS];
extern DukePlayer ps[MAXPLAYERS];
struct GameInterface : public ::GameInterface
{
@ -78,14 +78,14 @@ struct Dispatcher
void (*activatebysector)(sectortype* sect, DDukeActor* j);
void (*checksectors)(int low);
void (*addweapon)(player_struct *p, int weapon, bool wswitch);
void (*addweapon)(DukePlayer *p, int weapon, bool wswitch);
int (*ifhitbyweapon)(DDukeActor* sectnum);
// player
void (*incur_damage)(player_struct* p);
void (*incur_damage)(DukePlayer* p);
void (*selectweapon)(int snum, int j);
int (*doincrements)(player_struct* p);
void (*checkweapons)(player_struct* p);
int (*doincrements)(DukePlayer* p);
void (*checkweapons)(DukePlayer* p);
void (*processinput)(int snum);
void (*displayweapon)(int snum, double interpfrac);
void (*displaymasks)(int snum, int p, double interpfrac);
@ -102,18 +102,18 @@ void CallTick(DDukeActor* actor);
bool CallOperate(DDukeActor* actor, int plnum);
void CallAction(DDukeActor* actor);
void checkhitsprite(DDukeActor* actor, DDukeActor* hitter);
void CallOnHurt(DDukeActor* actor, player_struct* hitter);
void CallOnTouch(DDukeActor* actor, player_struct* hitter);
bool CallOnUse(DDukeActor* actor, player_struct* user);
void CallOnMotoSmash(DDukeActor* actor, player_struct* hitter);
void CallOnHurt(DDukeActor* actor, DukePlayer* hitter);
void CallOnTouch(DDukeActor* actor, DukePlayer* hitter);
bool CallOnUse(DDukeActor* actor, DukePlayer* user);
void CallOnMotoSmash(DDukeActor* actor, DukePlayer* hitter);
void CallOnRespawn(DDukeActor* actor, int low);
bool CallAnimate(DDukeActor* actor, tspritetype* hitter);
bool CallShootThis(DDukeActor* clsdef, DDukeActor* actor, int pn, const DVector3& spos, DAngle sang);
void CallStaticSetup(DDukeActor* actor);
void CallPlayFTASound(DDukeActor* actor, int mode = 0);
void CallStandingOn(DDukeActor* actor, player_struct* p);
void CallStandingOn(DDukeActor* actor, DukePlayer* p);
void CallRunState(DDukeActor* actor);
int CallTriggerSwitch(DDukeActor* actor, player_struct* p);
int CallTriggerSwitch(DDukeActor* actor, DukePlayer* p);
PClassActor* CallGetRadiusDamageType(DDukeActor* actor, int targhealth);

View file

@ -9,12 +9,12 @@ using DukeStatIterator = TStatIterator<DDukeActor>;
using DukeSectIterator = TSectIterator<DDukeActor>;
using DukeSpriteIterator = TSpriteIterator<DDukeActor>;
inline DDukeActor* player_struct::GetActor()
inline DDukeActor* DukePlayer::GetActor()
{
return actor;
}
inline int player_struct::GetPlayerNum()
inline int DukePlayer::GetPlayerNum()
{
return GetActor()->PlayerIndex();
}

View file

@ -39,7 +39,7 @@ void operaterespawns(int low);
void moveclouds(double interpfrac);
void movefta();
void clearcameras(player_struct* p);
void clearcameras(DukePlayer* p);
void RANDOMSCRAP(DDukeActor* i);
void detonate(DDukeActor* i, PClassActor* explosion);
void hitradius(DDukeActor* i, int r, int hp1, int hp2, int hp3, int hp4);
@ -88,8 +88,8 @@ void handle_se130(DDukeActor* i, int countmax);
int dodge(DDukeActor*);
void alterang(int ang, DDukeActor* actor, int g_p);
void checkavailweapon(player_struct* p);
void addammo(int weapon, player_struct* p, int amount);
void checkavailweapon(DukePlayer* p);
void addammo(int weapon, DukePlayer* p, int amount);
int ssp(DDukeActor* i, unsigned int cliptype); //The set sprite function
void insertspriteq(DDukeActor *i);
@ -114,35 +114,35 @@ void playerAimDown(int snum, ESyncBits actions);
DDukeActor* aim(DDukeActor* s, int aang, bool force = true, bool* b = nullptr);
DDukeActor* aim_(DDukeActor* actor, DDukeActor* weapon, double aimangle, bool* b = nullptr);
void shoot(DDukeActor* actor, PClass* cls);
void checkweapons(player_struct* const p);
void checkweapons(DukePlayer* const p);
int findotherplayer(int p, double* d);
void quickkill(player_struct* p);
int setpal(player_struct* p);
void quickkill(DukePlayer* p);
int setpal(DukePlayer* p);
int madenoise(int playerNum);
int haslock(sectortype* sect, int snum);
void purplelavacheck(player_struct* p);
void addphealth(player_struct* p, int amount, bool bigitem);
int playereat(player_struct* p, int amount, bool bigitem);
void playerdrink(player_struct* p, int amount);
int playeraddammo(player_struct* p, int weaponindex, int amount);
int playeraddweapon(player_struct* p, int weaponindex, int amount);
void playeraddinventory(player_struct* p, DDukeActor* item, int type, int amount);
void purplelavacheck(DukePlayer* p);
void addphealth(DukePlayer* p, int amount, bool bigitem);
int playereat(DukePlayer* p, int amount, bool bigitem);
void playerdrink(DukePlayer* p, int amount);
int playeraddammo(DukePlayer* p, int weaponindex, int amount);
int playeraddweapon(DukePlayer* p, int weaponindex, int amount);
void playeraddinventory(DukePlayer* p, DDukeActor* item, int type, int amount);
void actorsizeto(DDukeActor* actor, double x, double y);
void spawndebris(DDukeActor* g_ac, int dnum, int count);
int checkp(DDukeActor* self, player_struct* p, int flags);
int playercheckinventory(player_struct* p, DDukeActor* item, int type, int amount);
void playerstomp(player_struct* p, DDukeActor* stomped);
void playerreset(player_struct* p, DDukeActor* g_ac);
void wackplayer(player_struct* p);
int checkp(DDukeActor* self, DukePlayer* p, int flags);
int playercheckinventory(DukePlayer* p, DDukeActor* item, int type, int amount);
void playerstomp(DukePlayer* p, DDukeActor* stomped);
void playerreset(DukePlayer* p, DDukeActor* g_ac);
void wackplayer(DukePlayer* p);
void actoroperate(DDukeActor* g_ac);
void playerkick(player_struct* p, DDukeActor* g_ac);
void playerkick(DukePlayer* p, DDukeActor* g_ac);
void garybanjo(DDukeActor* g_ac);
int ifsquished(DDukeActor* i, int p);
void fakebubbaspawn(DDukeActor* actor, player_struct* p);
void fakebubbaspawn(DDukeActor* actor, DukePlayer* p);
void tearitup(sectortype* sect);
void destroyit(DDukeActor* actor);
void mamaspawn(DDukeActor* actor);
void forceplayerangle(player_struct* snum);
void forceplayerangle(DukePlayer* snum);
bool checkhitceiling(sectortype* sectp);
@ -156,7 +156,7 @@ void allignwarpelevators(void);
bool isablockdoor(int tileNum);
bool activatewarpelevators(DDukeActor* s, int w);
int check_activator_motion(int lotag);
void operateactivators(int l, player_struct* w);
void operateactivators(int l, DukePlayer* w);
void operateforcefields(DDukeActor* s, int low);
void operatemasterswitches(int lotag);
void operatesectors(sectortype* s, DDukeActor* i);
@ -168,11 +168,11 @@ int setanimation(sectortype* animsect, int animtype, walltype* animtarget, doubl
int setanimation(sectortype* animsect, int animtype, sectortype* animtarget, double thegoal, double thevel);
void dofurniture(walltype* wallNum, sectortype* sectnum, int playerNum);
void dotorch();
double hitawall(player_struct* pl, walltype** hitWall);
double hitawall(DukePlayer* pl, walltype** hitWall);
double hits(DDukeActor* snum);
DDukeActor* LocateTheLocator(int n, sectortype* sectnum);
void clearcamera(player_struct* ps);
void clearcamera(DukePlayer* ps);
void LoadActor(DDukeActor* i, int p, int x);
bool execute(DDukeActor* s, int p, double d, int* killit_flag = nullptr);
@ -189,14 +189,14 @@ void ceilingglass(DDukeActor* snum, sectortype* sectnum, int cnt);
void spriteglass(DDukeActor* snum, int cnt);
void lotsofcolourglass(DDukeActor* snum, walltype* wallNum, int cnt);
void lotsofglass(DDukeActor* snum, walltype* wal, int cnt);
void checkplayerhurt_d(player_struct* p, const Collision& coll);
void checkplayerhurt_r(player_struct* p, const Collision& coll);
void checkplayerhurt_d(DukePlayer* p, const Collision& coll);
void checkplayerhurt_r(DukePlayer* p, const Collision& coll);
DDukeActor* dospawnsprite(DDukeActor* actj, int pn);
void spriteinit(DDukeActor*, TArray<DDukeActor*>& actors);
DDukeActor* spawninit(DDukeActor* actj, DDukeActor* act, TArray<DDukeActor*>* actors);
void checkavailinven(player_struct* p);
void checkavailinven(DukePlayer* p);
bool initspriteforspawn(DDukeActor* spn);
void initshell(DDukeActor* actj, DDukeActor* acti, bool isshell);
void spawneffector(DDukeActor* actor, TArray<DDukeActor*>* actors);
@ -204,18 +204,18 @@ int startrts(int lumpNum, int localPlayer);
void pickrandomspot(int pn);
void premapcontroller(DDukeActor* ac);
void resetinventory(player_struct* pn);
void resetinventory(DukePlayer* pn);
void resetplayerstats(int pn);
void resetweapons(player_struct* pn);
void resetweapons(DukePlayer* pn);
void resetprestat(int snum, int g);
void prelevel_common(int g);
void cacheit();
void FTA(int q, player_struct* p);
void OnMotorcycle(player_struct *pl);
void OffMotorcycle(player_struct *pl);
void OnBoat(player_struct *pl);
void OffBoat(player_struct *pl);
void FTA(int q, DukePlayer* p);
void OnMotorcycle(DukePlayer *pl);
void OffMotorcycle(DukePlayer *pl);
void OnBoat(DukePlayer *pl);
void OffBoat(DukePlayer *pl);
void cameratext(DDukeActor* i);
void dobonus(int bonusonly, const CompletionFunc& completion);
@ -236,7 +236,7 @@ void enterlevel(MapRecord* mi, int gm);
void donewgame(MapRecord* map, int sk);
int playercolor2lookup(int color);
void PlayerColorChanged(void);
bool movementBlocked(player_struct *p);
bool movementBlocked(DukePlayer *p);
void underwater(int snum, ESyncBits actions, double floorz, double ceilingz);
void loadcons();
void DrawStatusBar();

View file

@ -634,7 +634,7 @@ void checkhitsprite(DDukeActor* actor, DDukeActor* hitter)
}
}
void CallOnHurt(DDukeActor* actor, player_struct* hitter)
void CallOnHurt(DDukeActor* actor, DukePlayer* hitter)
{
IFVIRTUALPTR(actor, DDukeActor, onHurt)
{
@ -643,7 +643,7 @@ void CallOnHurt(DDukeActor* actor, player_struct* hitter)
}
}
void CallOnTouch(DDukeActor* actor, player_struct* hitter)
void CallOnTouch(DDukeActor* actor, DukePlayer* hitter)
{
IFVIRTUALPTR(actor, DDukeActor, onTouch)
{
@ -653,7 +653,7 @@ void CallOnTouch(DDukeActor* actor, player_struct* hitter)
}
bool CallOnUse(DDukeActor* actor, player_struct* user)
bool CallOnUse(DDukeActor* actor, DukePlayer* user)
{
int nval = false;
IFVIRTUALPTR(actor, DDukeActor, onUse)
@ -665,7 +665,7 @@ bool CallOnUse(DDukeActor* actor, player_struct* user)
return nval;
}
void CallOnMotoSmash(DDukeActor* actor, player_struct* hitter)
void CallOnMotoSmash(DDukeActor* actor, DukePlayer* hitter)
{
IFVIRTUALPTR(actor, DDukeActor, onMotoSmash)
{
@ -726,7 +726,7 @@ void CallPlayFTASound(DDukeActor* actor, int mode)
}
}
void CallStandingOn(DDukeActor* actor, player_struct* p)
void CallStandingOn(DDukeActor* actor, DukePlayer* p)
{
IFVIRTUALPTR(actor, DDukeActor, StandingOn)
{
@ -735,7 +735,7 @@ void CallStandingOn(DDukeActor* actor, player_struct* p)
}
}
int CallTriggerSwitch(DDukeActor* actor, player_struct* p)
int CallTriggerSwitch(DDukeActor* actor, DukePlayer* p)
{
int nval = false;
IFVIRTUALPTR(actor, DDukeActor, TriggerSwitch)

View file

@ -96,7 +96,7 @@ void GameInterface::ExitFromMenu()
//
//---------------------------------------------------------------------------
void FTA(int q, player_struct* p)
void FTA(int q, DukePlayer* p)
{
if (q < 0 || gamestate != GS_LEVEL)
return;
@ -211,7 +211,7 @@ void V_AddBlend (float r, float g, float b, float a, float v_blend[4])
void drawoverlays(double interpfrac)
{
player_struct* pp;
DukePlayer* pp;
DVector2 cposxy;
DAngle cang;

View file

@ -1295,7 +1295,7 @@ void DoActor(bool bSet, int lVar1, int lLabelID, int lVar2, DDukeActor* sActor,
//
//---------------------------------------------------------------------------
int CheckWeapRec(player_struct* p, DDukeActor* g_ac, int testonly)
int CheckWeapRec(DukePlayer* p, DDukeActor* g_ac, int testonly)
{
int j;
for (j = 0; j < p->weapreccnt; j++)
@ -1413,7 +1413,7 @@ static int ifcanshoottarget(DDukeActor *actor, int g_p, int g_x)
//
//---------------------------------------------------------------------------
int ifcansee(DDukeActor* actor, player_struct* p)
int ifcansee(DDukeActor* actor, DukePlayer* p)
{
int j;
DDukeActor* tosee;

View file

@ -46,7 +46,7 @@ DukeGameInfo gs;
int screenpeek;
// serialized
player_struct ps[MAXPLAYERS];
DukePlayer ps[MAXPLAYERS];
//-------------------------------------------------------------------------
//

View file

@ -70,7 +70,7 @@ extern int screenpeek;
// Variables that must be saved
extern int rtsplaying;
extern player_struct ps[MAXPLAYERS];
extern DukePlayer ps[MAXPLAYERS];
extern int spriteqamount;
extern int lastvisinc;
extern animwalltype animwall[MAXANIMWALLS];

View file

@ -61,7 +61,7 @@ inline static void hud_drawpal(double x, double y, const char* tilenum, int shad
//
//---------------------------------------------------------------------------
static void displayloogie(player_struct* p, double const interpfrac)
static void displayloogie(DukePlayer* p, double const interpfrac)
{
if (p->loogcnt == 0) return;
@ -84,7 +84,7 @@ static void displayloogie(player_struct* p, double const interpfrac)
//
//---------------------------------------------------------------------------
static bool animatefist(int gs, player_struct* p, double xoffset, double yoffset, int fistpal, double const interpfrac)
static bool animatefist(int gs, DukePlayer* p, double xoffset, double yoffset, int fistpal, double const interpfrac)
{
const double fisti = min(interpolatedvalue<double>(p->ofist_incs, p->fist_incs, interpfrac), 32.);
if (fisti <= 0) return false;
@ -103,7 +103,7 @@ static bool animatefist(int gs, player_struct* p, double xoffset, double yoffset
//
//---------------------------------------------------------------------------
static bool animateknee(int gs, player_struct* p, double xoffset, double yoffset, int pal, double const interpfrac, DAngle angle)
static bool animateknee(int gs, DukePlayer* p, double xoffset, double yoffset, int pal, double const interpfrac, DAngle angle)
{
if (p->knee_incs > 11 || p->knee_incs == 0 || p->GetActor()->spr.extra <= 0) return false;
@ -121,7 +121,7 @@ static bool animateknee(int gs, player_struct* p, double xoffset, double yoffset
//
//---------------------------------------------------------------------------
static bool animateknuckles(int gs, player_struct* p, double xoffset, double yoffset, int pal, DAngle angle)
static bool animateknuckles(int gs, DukePlayer* p, double xoffset, double yoffset, int pal, DAngle angle)
{
if (isWW2GI() || p->over_shoulder_on != 0 || p->knuckle_incs == 0 || p->GetActor()->spr.extra <= 0) return false;
static const char* const frames[] = { "CRACKKNUCKLES0", "CRACKKNUCKLES1", "CRACKKNUCKLES2", "CRACKKNUCKLES3" };
@ -158,7 +158,7 @@ void displaymasks_d(int snum, int p, double interpfrac)
//
//---------------------------------------------------------------------------
static bool animatetip(int gs, player_struct* p, double xoffset, double yoffset, int pal, double const interpfrac, DAngle angle)
static bool animatetip(int gs, DukePlayer* p, double xoffset, double yoffset, int pal, double const interpfrac, DAngle angle)
{
if (p->tipincs == 0) return false;
@ -177,7 +177,7 @@ static bool animatetip(int gs, player_struct* p, double xoffset, double yoffset,
//
//---------------------------------------------------------------------------
static bool animateaccess(int gs, player_struct* p, double xoffset, double yoffset, double const interpfrac, DAngle angle)
static bool animateaccess(int gs, DukePlayer* p, double xoffset, double yoffset, double const interpfrac, DAngle angle)
{
if (p->access_incs == 0 || p->GetActor()->spr.extra <= 0) return false;
@ -201,7 +201,7 @@ static bool animateaccess(int gs, player_struct* p, double xoffset, double yoffs
//
//---------------------------------------------------------------------------
void animateshrunken(player_struct* p, double xoffset, double yoffset, int8_t shade, int o, double interpfrac)
void animateshrunken(DukePlayer* p, double xoffset, double yoffset, int8_t shade, int o, double interpfrac)
{
const double fistsign = BobVal(interpolatedvalue<double>(p->ofistsign, p->fistsign, interpfrac)) * 16;
int pal = ps[screenpeek].cursector->floorpal;
@ -220,7 +220,7 @@ void animateshrunken(player_struct* p, double xoffset, double yoffset, int8_t sh
void displayweapon_d(int snum, double interpfrac)
{
int pal, pal2;
player_struct* p = &ps[snum];
DukePlayer* p = &ps[snum];
if (p->newOwner != nullptr || ud.cameraactor != nullptr || p->over_shoulder_on > 0 || (p->GetActor()->spr.pal != 1 && p->GetActor()->spr.extra <= 0))
return;

View file

@ -208,7 +208,7 @@ void DrawBoat(int const kb, const DVector2& offsets, DAngle angle, int shade, in
//
//
//---------------------------------------------------------------------------
void animateshrunken(player_struct* p, double xoffset, double yoffset, int8_t shade, int o, double interpfrac);
void animateshrunken(DukePlayer* p, double xoffset, double yoffset, int8_t shade, int o, double interpfrac);
void displayweapon_r(int snum, double interpfrac)
{

View file

@ -160,7 +160,7 @@ inline void clearfriction()
}
}
inline void SetPlayerPal(player_struct* p, PalEntry pe)
inline void SetPlayerPal(DukePlayer* p, PalEntry pe)
{
p->pals = pe;
}
@ -170,7 +170,7 @@ inline bool playrunning()
return (paused == 0 || (paused == 1 && (ud.recstat == 2 || ud.multimode > 1)));
}
inline void doslopetilting(player_struct* p)
inline void doslopetilting(DukePlayer* p)
{
p->Angles.doViewPitch(p->aim_mode == 0 && p->on_ground && p->cursector->lotag != ST_2_UNDERWATER);
}
@ -338,7 +338,7 @@ inline void subkill(DDukeActor* actor)
}
}
inline void dokill(player_struct* p, DDukeActor* g_ac, int amount)
inline void dokill(DukePlayer* p, DDukeActor* g_ac, int amount)
{
if (g_ac->spriteextra < 1 || g_ac->spriteextra == 128 || !isRR())
{

View file

@ -54,7 +54,7 @@ void hud_input(int plnum)
{
int i, k;
uint8_t dainv;
player_struct* p;
DukePlayer* p;
p = &ps[plnum];
auto pact = p->GetActor();

View file

@ -32,7 +32,7 @@ BEGIN_DUKE_NS
int madenoise(int snum)
{
player_struct *p;
DukePlayer *p;
p = &ps[snum];
p->donoise = 1;
p->noise = p->GetActor()->spr.pos.XY();

View file

@ -78,7 +78,7 @@ void PlayerColorChanged(void)
//
//---------------------------------------------------------------------------
int setpal(player_struct* p)
int setpal(DukePlayer* p)
{
int palette;
if (p->DrugMode) palette = DRUGPAL;
@ -96,7 +96,7 @@ int setpal(player_struct* p)
//
//---------------------------------------------------------------------------
void quickkill(player_struct* p)
void quickkill(DukePlayer* p)
{
SetPlayerPal(p, PalEntry(48, 48, 48, 48));
@ -113,7 +113,7 @@ void quickkill(player_struct* p)
//
//---------------------------------------------------------------------------
void forceplayerangle(player_struct* p)
void forceplayerangle(DukePlayer* p)
{
const auto ang = (DAngle22_5 - randomAngle(45)) / 2.;
@ -174,7 +174,7 @@ double hitasprite(DDukeActor* actor, DDukeActor** hitsp)
//
//---------------------------------------------------------------------------
double hitawall(player_struct* p, walltype** hitw)
double hitawall(DukePlayer* p, walltype** hitw)
{
HitInfo hit{};
@ -708,7 +708,7 @@ void playerJump(int snum, double floorz, double ceilingz)
//
//---------------------------------------------------------------------------
void player_struct::apply_seasick()
void DukePlayer::apply_seasick()
{
if (isRRRA() && SeaSick && (dead_flag == 0))
{
@ -736,7 +736,7 @@ void player_struct::apply_seasick()
//
//---------------------------------------------------------------------------
void player_struct::backuppos(bool noclipping)
void DukePlayer::backuppos(bool noclipping)
{
if (!noclipping)
{
@ -758,7 +758,7 @@ void player_struct::backuppos(bool noclipping)
//
//---------------------------------------------------------------------------
void player_struct::backupweapon()
void DukePlayer::backupweapon()
{
oweapon_sway = weapon_sway;
oweapon_pos = weapon_pos;
@ -779,7 +779,7 @@ void player_struct::backupweapon()
//
//---------------------------------------------------------------------------
void player_struct::checkhardlanding()
void DukePlayer::checkhardlanding()
{
if (hard_landing > 0)
{
@ -788,7 +788,7 @@ void player_struct::checkhardlanding()
}
}
void player_struct::playerweaponsway(double xvel)
void DukePlayer::playerweaponsway(double xvel)
{
if (cl_weaponsway)
{
@ -966,7 +966,7 @@ void shoot(DDukeActor* actor, PClass* cls)
//
//---------------------------------------------------------------------------
bool movementBlocked(player_struct *p)
bool movementBlocked(DukePlayer *p)
{
auto blockingweapon = [=]()
{
@ -1026,7 +1026,7 @@ int haslock(sectortype* sectp, int snum)
//
//---------------------------------------------------------------------------
void purplelavacheck(player_struct* p)
void purplelavacheck(DukePlayer* p)
{
auto pact = p->GetActor();
if (p->spritebridge == 0 && pact->insector())
@ -1060,7 +1060,7 @@ void purplelavacheck(player_struct* p)
//
//---------------------------------------------------------------------------
void addphealth(player_struct* p, int amount, bool bigitem)
void addphealth(DukePlayer* p, int amount, bool bigitem)
{
if (p->newOwner != nullptr)
{
@ -1124,7 +1124,7 @@ void addphealth(player_struct* p, int amount, bool bigitem)
//
//---------------------------------------------------------------------------
int playereat(player_struct* p, int amount, bool bigitem)
int playereat(DukePlayer* p, int amount, bool bigitem)
{
p->eat += amount;
if (p->eat > 100)
@ -1181,7 +1181,7 @@ int playereat(player_struct* p, int amount, bool bigitem)
//
//---------------------------------------------------------------------------
void playerdrink(player_struct* p, int amount)
void playerdrink(DukePlayer* p, int amount)
{
p->drink_amt += amount;
int curhealth = p->GetActor()->spr.extra;
@ -1221,7 +1221,7 @@ void playerdrink(player_struct* p, int amount)
//
//---------------------------------------------------------------------------
int playeraddammo(player_struct* p, int weaponindex, int amount)
int playeraddammo(DukePlayer* p, int weaponindex, int amount)
{
if (p->ammo_amount[weaponindex] >= gs.max_ammo_amount[weaponindex])
{
@ -1234,7 +1234,7 @@ int playeraddammo(player_struct* p, int weaponindex, int amount)
return true;
}
int playeraddweapon(player_struct* p, int weaponindex, int amount)
int playeraddweapon(DukePlayer* p, int weaponindex, int amount)
{
if (p->gotweapon[weaponindex] == 0) fi.addweapon(p, weaponindex, !!(WeaponSwitch(p- ps) & 1));
else if (p->ammo_amount[weaponindex] >= gs.max_ammo_amount[weaponindex])
@ -1255,7 +1255,7 @@ int playeraddweapon(player_struct* p, int weaponindex, int amount)
//
//---------------------------------------------------------------------------
void playeraddinventory(player_struct* p, DDukeActor* item, int type, int amount)
void playeraddinventory(DukePlayer* p, DDukeActor* item, int type, int amount)
{
switch (type)
{
@ -1322,7 +1322,7 @@ void playeraddinventory(player_struct* p, DDukeActor* item, int type, int amount
//
//---------------------------------------------------------------------------
int checkp(DDukeActor* self, player_struct* p, int flags)
int checkp(DDukeActor* self, DukePlayer* p, int flags)
{
bool j = 0;
@ -1381,7 +1381,7 @@ int checkp(DDukeActor* self, player_struct* p, int flags)
//
//---------------------------------------------------------------------------
int playercheckinventory(player_struct* p, DDukeActor* item, int type, int amount)
int playercheckinventory(DukePlayer* p, DDukeActor* item, int type, int amount)
{
bool j = 0;
switch (type)
@ -1457,7 +1457,7 @@ int playercheckinventory(player_struct* p, DDukeActor* item, int type, int amoun
//
//---------------------------------------------------------------------------
void playerstomp(player_struct* p, DDukeActor* stomped)
void playerstomp(DukePlayer* p, DDukeActor* stomped)
{
if (p->knee_incs == 0 && p->GetActor()->spr.scale.X >= (isRR() ? 0.140625 : 0.625))
if (cansee(stomped->spr.pos.plusZ(-4), stomped->sector(), p->GetActor()->getPosWithOffsetZ().plusZ(16), p->GetActor()->sector()))
@ -1475,7 +1475,7 @@ void playerstomp(player_struct* p, DDukeActor* stomped)
//
//---------------------------------------------------------------------------
void playerreset(player_struct* p, DDukeActor* g_ac)
void playerreset(DukePlayer* p, DDukeActor* g_ac)
{
if (ud.multimode < 2)
{
@ -1540,7 +1540,7 @@ void playerreset(player_struct* p, DDukeActor* g_ac)
//
//---------------------------------------------------------------------------
void wackplayer(player_struct* p)
void wackplayer(DukePlayer* p)
{
if (!isRR())
forceplayerangle(p);
@ -1559,7 +1559,7 @@ void wackplayer(player_struct* p)
//
//---------------------------------------------------------------------------
void playerkick(player_struct* p, DDukeActor* g_ac)
void playerkick(DukePlayer* p, DDukeActor* g_ac)
{
if (ud.multimode > 1 && g_ac->isPlayer())
{

View file

@ -49,7 +49,7 @@ void operateweapon_ww(int snum, ESyncBits actions);
//
//---------------------------------------------------------------------------
void incur_damage_d(player_struct* p)
void incur_damage_d(DukePlayer* p)
{
int damage = 0L, shield_damage = 0L;
@ -337,7 +337,7 @@ void selectweapon_d(int snum, int weap) // playernum, weaponnum
//
//---------------------------------------------------------------------------
int doincrements_d(player_struct* p)
int doincrements_d(DukePlayer* p)
{
int snum;
@ -536,7 +536,7 @@ int doincrements_d(player_struct* p)
//
//---------------------------------------------------------------------------
void checkweapons_d(player_struct* p)
void checkweapons_d(DukePlayer* p)
{
static PClassActor* const * const weapon_sprites[MAX_WEAPONS] = { &DukeMeleeAttackClass, &DukeFirstgunSpriteClass, &DukeShotgunSpriteClass,
&DukeChaingunSpriteClass, &DukeRPGSpriteClass, &DukePipeBombClass, &DukeShrinkerSpriteClass, &DukeDevastatorSpriteClass,
@ -1536,7 +1536,7 @@ void processinput_d(int snum)
Collision chz, clz;
bool shrunk;
int psectlotag;
player_struct* p;
DukePlayer* p;
p = &ps[snum];
auto pact = p->GetActor();

View file

@ -43,7 +43,7 @@ BEGIN_DUKE_NS
//
//---------------------------------------------------------------------------
void incur_damage_r(player_struct* p)
void incur_damage_r(DukePlayer* p)
{
int damage = 0, shield_damage = 0;
int gut = 0;
@ -343,7 +343,7 @@ void selectweapon_r(int snum, int weap)
//
//---------------------------------------------------------------------------
int doincrements_r(player_struct* p)
int doincrements_r(DukePlayer* p)
{
int snum;
auto pact = p->GetActor();
@ -600,7 +600,7 @@ int doincrements_r(player_struct* p)
//
//---------------------------------------------------------------------------
void checkweapons_r(player_struct* p)
void checkweapons_r(DukePlayer* p)
{
static PClassActor* const* const weapon_sprites[MAX_WEAPONS] = { &DukeMeleeAttackClass, &RedneckRevolverClass, &RedneckShotgunClass,
&RedneckRiflegunClass, &RedneckDynamiteClass, &RedneckCrossbowClass, &RedneckRipsawClass, &RedneckBlasterClass,
@ -709,7 +709,7 @@ enum : unsigned
VEH_FWDBRAKING = VEH_FORWARD|VEH_BRAKING,
};
static unsigned outVehicleFlags(player_struct* p, ESyncBits& actions)
static unsigned outVehicleFlags(DukePlayer* p, ESyncBits& actions)
{
unsigned flags = 0;
flags += VEH_FORWARD * (p->input.fvel > 0);
@ -727,7 +727,7 @@ static unsigned outVehicleFlags(player_struct* p, ESyncBits& actions)
//
//---------------------------------------------------------------------------
static void doVehicleTilting(player_struct* const p, const bool canTilt)
static void doVehicleTilting(DukePlayer* const p, const bool canTilt)
{
auto adj = DAngle::fromDeg(p->input.avel * (545943. / 3200000.) * canTilt);
if (p->OnMotorcycle) adj *= 5 * Sgn(p->MotoSpeed);
@ -744,7 +744,7 @@ static void doVehicleTilting(player_struct* const p, const bool canTilt)
//
//---------------------------------------------------------------------------
static void doVehicleBumping(player_struct* p, DDukeActor* pact, unsigned flags, bool bumptest, int bumpscale)
static void doVehicleBumping(DukePlayer* p, DDukeActor* pact, unsigned flags, bool bumptest, int bumpscale)
{
if (p->MotoSpeed != 0 && p->on_ground == 1)
{
@ -805,7 +805,7 @@ static void doVehicleBumping(player_struct* p, DDukeActor* pact, unsigned flags,
//
//---------------------------------------------------------------------------
static void doVehicleDrunk(player_struct* const p)
static void doVehicleDrunk(DukePlayer* const p)
{
if (p->drink_amt > 88 && p->moto_drink == 0)
{
@ -831,7 +831,7 @@ static void doVehicleDrunk(player_struct* const p)
//
//---------------------------------------------------------------------------
static void doVehicleSounds(player_struct* p, DDukeActor* pact, unsigned flags, unsigned sound1, unsigned sound2, unsigned sound3, unsigned sound4)
static void doVehicleSounds(DukePlayer* p, DDukeActor* pact, unsigned flags, unsigned sound1, unsigned sound2, unsigned sound3, unsigned sound4)
{
if ((p->OnBoat && (flags & VEH_FWDBRAKING) == VEH_FORWARD) || flags & VEH_FORWARD)
{
@ -883,7 +883,7 @@ static void doVehicleSounds(player_struct* p, DDukeActor* pact, unsigned flags,
//
//---------------------------------------------------------------------------
static void doVehicleThrottling(player_struct* p, DDukeActor* pact, unsigned& flags, int fwdSpeed, int revSpeed, int brakeSpeed, int vBmpFwd, int vBmpBrake)
static void doVehicleThrottling(DukePlayer* p, DDukeActor* pact, unsigned& flags, int fwdSpeed, int revSpeed, int brakeSpeed, int vBmpFwd, int vBmpBrake)
{
if (p->on_ground == 1)
{
@ -2946,7 +2946,7 @@ HORIZONLY:
//
//---------------------------------------------------------------------------
void OnMotorcycle(player_struct *p)
void OnMotorcycle(DukePlayer *p)
{
if (!p->OnMotorcycle && p->cursector->lotag != ST_2_UNDERWATER)
{
@ -2969,7 +2969,7 @@ void OnMotorcycle(player_struct *p)
//
//---------------------------------------------------------------------------
void OffMotorcycle(player_struct *p)
void OffMotorcycle(DukePlayer *p)
{
auto pact = p->GetActor();
if (p->OnMotorcycle)
@ -3013,7 +3013,7 @@ void OffMotorcycle(player_struct *p)
//
//---------------------------------------------------------------------------
void OnBoat(player_struct *p)
void OnBoat(DukePlayer *p)
{
if (!p->OnBoat)
{
@ -3034,7 +3034,7 @@ void OnBoat(player_struct *p)
//
//---------------------------------------------------------------------------
void OffBoat(player_struct *p)
void OffBoat(DukePlayer *p)
{
if (p->OnBoat)
{

View file

@ -48,7 +48,7 @@ int operateTripbomb(int snum);
//
//---------------------------------------------------------------------------
void DoFire(player_struct* p, int snum)
void DoFire(DukePlayer* p, int snum)
{
int i;
@ -105,7 +105,7 @@ void DoFire(player_struct* p, int snum)
//
//---------------------------------------------------------------------------
void DoSpawn(player_struct *p, int snum)
void DoSpawn(DukePlayer *p, int snum)
{
if(!aplWeaponSpawn(p->curr_weapon, snum))
return;

View file

@ -60,7 +60,7 @@ void premapcontroller(DDukeActor* ac)
void pickrandomspot(int snum)
{
player_struct* p;
DukePlayer* p;
int i;
p = &ps[snum];
@ -85,7 +85,7 @@ void pickrandomspot(int snum)
void resetplayerstats(int snum)
{
player_struct* p;
DukePlayer* p;
p = &ps[snum];
@ -259,7 +259,7 @@ void resetplayerstats(int snum)
//
//---------------------------------------------------------------------------
void resetweapons(player_struct* p)
void resetweapons(DukePlayer* p)
{
for (int weapon = PISTOL_WEAPON; weapon < MAX_WEAPONS; weapon++)
{
@ -302,7 +302,7 @@ void resetweapons(player_struct* p)
//
//---------------------------------------------------------------------------
void resetinventory(player_struct* p)
void resetinventory(DukePlayer* p)
{
p->inven_icon = 0;
p->boot_amount = 0;
@ -374,7 +374,7 @@ void resetinventory(player_struct* p)
void resetprestat(int snum,int g)
{
player_struct* p;
DukePlayer* p;
p = &ps[snum];
@ -1058,7 +1058,7 @@ void cacheit(void)
//
//---------------------------------------------------------------------------
static int LoadTheMap(MapRecord *mi, player_struct*p, int gamemode)
static int LoadTheMap(MapRecord *mi, DukePlayer*p, int gamemode)
{
int16_t lbang;
if (isShareware() && (mi->flags & MI_USERMAP))

View file

@ -42,7 +42,7 @@ BEGIN_DUKE_NS
void prelevel_r(int g, TArray<DDukeActor*>& actors)
{
player_struct* p;
DukePlayer* p;
int j;
int lotaglist;
TArray<short> lotags;

View file

@ -129,7 +129,7 @@ bool GameInterface::GetGeoEffect(GeoEffect* eff, sectortype* viewsector)
//---------------------------------------------------------------------------
int DrugTimer;
static int getdrugmode(player_struct *p, int oyrepeat)
static int getdrugmode(DukePlayer *p, int oyrepeat)
{
int now = I_GetBuildTime() >> 1; // this function works on a 60 fps setup.
if (playrunning() && p->DrugMode > 0)
@ -218,7 +218,7 @@ void displayrooms(int snum, double interpfrac, bool sceneonly)
DVector3 cpos;
DRotator cangles;
player_struct* p = &ps[snum];
DukePlayer* p = &ps[snum];
// update render angles.
p->Angles.updateCameraAngles(interpfrac);

View file

@ -103,7 +103,7 @@ FSerializer& Serialize(FSerializer& arc, const char* keyname, player_orig& w, pl
return arc;
}
FSerializer& Serialize(FSerializer& arc, const char* keyname, player_struct& w, player_struct* def)
FSerializer& Serialize(FSerializer& arc, const char* keyname, DukePlayer& w, DukePlayer* def)
{
if (arc.BeginObject(keyname))
{

View file

@ -1126,7 +1126,7 @@ void operatesectors(sectortype* sptr, DDukeActor *actor)
//
//---------------------------------------------------------------------------
void operateactivators(int low, player_struct* plr)
void operateactivators(int low, DukePlayer* plr)
{
int i, j, k;
Cycler * p;

View file

@ -117,7 +117,7 @@ void activatebysector_d(sectortype* sect, DDukeActor* activator)
//
//---------------------------------------------------------------------------
void checkplayerhurt_d(player_struct* p, const Collision& coll)
void checkplayerhurt_d(DukePlayer* p, const Collision& coll)
{
if (coll.type == kHitSprite)
{
@ -158,7 +158,7 @@ void checkplayerhurt_d(player_struct* p, const Collision& coll)
//
//---------------------------------------------------------------------------
void clearcameras(player_struct* p)
void clearcameras(DukePlayer* p)
{
p->GetActor()->restorepos();
p->newOwner = nullptr;
@ -181,7 +181,7 @@ void clearcameras(player_struct* p)
void checksectors_d(int snum)
{
int i = -1;
player_struct* p;
DukePlayer* p;
walltype* hitscanwall;
HitInfo near;

View file

@ -127,7 +127,7 @@ void activatebysector_r(sectortype* sect, DDukeActor* activator)
//
//---------------------------------------------------------------------------
void checkplayerhurt_r(player_struct* p, const Collision &coll)
void checkplayerhurt_r(DukePlayer* p, const Collision &coll)
{
if (coll.type == kHitSprite)
{
@ -160,7 +160,7 @@ void checkplayerhurt_r(player_struct* p, const Collision &coll)
void checksectors_r(int snum)
{
player_struct* p;
DukePlayer* p;
walltype* hitscanwall;
HitInfo near;

View file

@ -224,7 +224,7 @@ struct player_orig
sectortype* os;
};
struct player_struct
struct DukePlayer
{
DVector3 vel;
DVector2 bobpos;

View file

@ -13,7 +13,7 @@ void resetswitch(int tag);
//
//---------------------------------------------------------------------------
player_struct* duke_getviewplayer()
DukePlayer* duke_getviewplayer()
{
return &ps[screenpeek];
}
@ -24,7 +24,7 @@ DEFINE_ACTION_FUNCTION_NATIVE(_Duke, getviewplayer, duke_getviewplayer)
ACTION_RETURN_POINTER(duke_getviewplayer());
}
player_struct* duke_getlocalplayer()
DukePlayer* duke_getlocalplayer()
{
return &ps[myconnectindex];
}
@ -97,7 +97,7 @@ DEFINE_ACTION_FUNCTION_NATIVE(_Duke, CheckSoundPlaying, duke_CheckSoundPlaying)
ACTION_RETURN_INT(duke_CheckSoundPlaying(snd));
}
player_struct* duke_checkcursectnums(sectortype* sector)
DukePlayer* duke_checkcursectnums(sectortype* sector)
{
if (!sector) return nullptr;
int pp = checkcursectnums(sector);
@ -176,7 +176,7 @@ DEFINE_ACTION_FUNCTION_NATIVE(_Duke, StopCommentary, StopCommentary)
return 0;
}
int getPlayerIndex(player_struct* p)
int getPlayerIndex(DukePlayer* p)
{
if (!p) return -1;
return int(p - ps);
@ -185,7 +185,7 @@ int getPlayerIndex(player_struct* p)
DEFINE_ACTION_FUNCTION_NATIVE(_Duke, getPlayerIndex, getPlayerIndex)
{
PARAM_PROLOGUE;
PARAM_POINTER(p, player_struct);
PARAM_POINTER(p, DukePlayer);
ACTION_RETURN_INT(getPlayerIndex(p));
}
@ -335,7 +335,7 @@ DEFINE_ACTION_FUNCTION_NATIVE(DDukeActor, getglobalz, getglobalz)
return 0;
}
player_struct* DukeActor_findplayer(DDukeActor* self, double* dist)
DukePlayer* DukeActor_findplayer(DDukeActor* self, double* dist)
{
double a;
return &ps[findplayer(self, dist? dist : &a)];
@ -351,7 +351,7 @@ DEFINE_ACTION_FUNCTION_NATIVE(DDukeActor, findplayer, DukeActor_findplayer)
return min(numret, 2);
}
player_struct* DukeActor_getplayer(DDukeActor* self)
DukePlayer* DukeActor_getplayer(DDukeActor* self)
{
return self->isPlayer() ? &ps[self->PlayerIndex()] : nullptr;
}
@ -693,7 +693,7 @@ DEFINE_ACTION_FUNCTION_NATIVE(DDukeActor, restoreloc, DukeActor_restoreloc)
DEFINE_ACTION_FUNCTION_NATIVE(DDukeActor, fakebubbaspawn, fakebubbaspawn)
{
PARAM_SELF_PROLOGUE(DDukeActor);
PARAM_POINTER(p, player_struct);
PARAM_POINTER(p, DukePlayer);
fakebubbaspawn(self, p);
return 0;
}
@ -770,7 +770,7 @@ DEFINE_ACTION_FUNCTION_NATIVE(DDukeActor, SetAI, Duke_SetAI)
DEFINE_ACTION_FUNCTION_NATIVE(DDukeActor, checkp, checkp)
{
PARAM_SELF_PROLOGUE(DDukeActor);
PARAM_POINTER(p, player_struct);
PARAM_POINTER(p, DukePlayer);
PARAM_INT(n);
ACTION_RETURN_INT(checkp(self, p, n));
}
@ -778,7 +778,7 @@ DEFINE_ACTION_FUNCTION_NATIVE(DDukeActor, checkp, checkp)
DEFINE_ACTION_FUNCTION_NATIVE(DDukeActor, cansee, ifcansee)
{
PARAM_SELF_PROLOGUE(DDukeActor);
PARAM_POINTER(p, player_struct);
PARAM_POINTER(p, DukePlayer);
PARAM_INT(n);
ACTION_RETURN_INT(ifcansee(self, p));
}
@ -793,7 +793,7 @@ DEFINE_ACTION_FUNCTION_NATIVE(DDukeActor, actoroperate, actoroperate)
DEFINE_ACTION_FUNCTION_NATIVE(DDukeActor, ifsquished, ifsquished)
{
PARAM_SELF_PROLOGUE(DDukeActor);
PARAM_POINTER(p, player_struct);
PARAM_POINTER(p, DukePlayer);
ACTION_RETURN_INT(ifcansee(self, p));
}
@ -810,7 +810,7 @@ DEFINE_ACTION_FUNCTION_NATIVE(DDukeActor, ChangeType, Duke_ChangeType)
return 0;
}
void Duke_fall(DDukeActor* self, player_struct* p)
void Duke_fall(DDukeActor* self, DukePlayer* p)
{
fall(self, p->GetPlayerNum());
}
@ -818,7 +818,7 @@ void Duke_fall(DDukeActor* self, player_struct* p)
DEFINE_ACTION_FUNCTION_NATIVE(DDukeActor, fall, Duke_fall)
{
PARAM_SELF_PROLOGUE(DDukeActor);
PARAM_POINTER(p, player_struct);
PARAM_POINTER(p, DukePlayer);
Duke_fall(self, p);
return 0;
}
@ -838,14 +838,14 @@ DEFINE_ACTION_FUNCTION_NATIVE(DDukeActor, dodge, dodge)
ACTION_RETURN_INT(dodge(self));
}
int Duke_ifcanshoottarget(DDukeActor* self, player_struct* p, double dist)
int Duke_ifcanshoottarget(DDukeActor* self, DukePlayer* p, double dist)
{
return ifcanshoottarget(self, p->GetPlayerNum(), int(dist * worldtoint));
}
DEFINE_ACTION_FUNCTION_NATIVE(DDukeActor, ifcanshoottarget, Duke_ifcanshoottarget)
{
PARAM_SELF_PROLOGUE(DDukeActor);
PARAM_POINTER(p, player_struct);
PARAM_POINTER(p, DukePlayer);
PARAM_FLOAT(x);
ACTION_RETURN_INT(Duke_ifcanshoottarget(self, p, x));
}
@ -952,208 +952,208 @@ DEFINE_ACTION_FUNCTION(DDukeActor, killit)
//
//---------------------------------------------------------------------------
DEFINE_FIELD_X(DukePlayer, player_struct, gotweapon)
DEFINE_FIELD_X(DukePlayer, player_struct, pals)
DEFINE_FIELD_X(DukePlayer, player_struct, weapon_sway)
DEFINE_FIELD_X(DukePlayer, player_struct, oweapon_sway)
DEFINE_FIELD_X(DukePlayer, player_struct, weapon_pos)
DEFINE_FIELD_X(DukePlayer, player_struct, kickback_pic)
DEFINE_FIELD_X(DukePlayer, player_struct, random_club_frame)
DEFINE_FIELD_X(DukePlayer, player_struct, oweapon_pos)
DEFINE_FIELD_X(DukePlayer, player_struct, okickback_pic)
DEFINE_FIELD_X(DukePlayer, player_struct, orandom_club_frame)
DEFINE_FIELD_X(DukePlayer, player_struct, hard_landing)
DEFINE_FIELD_X(DukePlayer, player_struct, ohard_landing)
DEFINE_FIELD_X(DukePlayer, player_struct, psectlotag)
DEFINE_FIELD_X(DukePlayer, DukePlayer, gotweapon)
DEFINE_FIELD_X(DukePlayer, DukePlayer, pals)
DEFINE_FIELD_X(DukePlayer, DukePlayer, weapon_sway)
DEFINE_FIELD_X(DukePlayer, DukePlayer, oweapon_sway)
DEFINE_FIELD_X(DukePlayer, DukePlayer, weapon_pos)
DEFINE_FIELD_X(DukePlayer, DukePlayer, kickback_pic)
DEFINE_FIELD_X(DukePlayer, DukePlayer, random_club_frame)
DEFINE_FIELD_X(DukePlayer, DukePlayer, oweapon_pos)
DEFINE_FIELD_X(DukePlayer, DukePlayer, okickback_pic)
DEFINE_FIELD_X(DukePlayer, DukePlayer, orandom_club_frame)
DEFINE_FIELD_X(DukePlayer, DukePlayer, hard_landing)
DEFINE_FIELD_X(DukePlayer, DukePlayer, ohard_landing)
DEFINE_FIELD_X(DukePlayer, DukePlayer, psectlotag)
//DEFINE_FIELD_X(DukePlayer, player_struct, exitx)
//DEFINE_FIELD_X(DukePlayer, player_struct, exity)
DEFINE_FIELD_UNSIZED(DukePlayer, player_struct, loogie)
DEFINE_FIELD_X(DukePlayer, player_struct, numloogs)
DEFINE_FIELD_X(DukePlayer, player_struct, loogcnt)
DEFINE_FIELD_X(DukePlayer, player_struct, invdisptime)
DEFINE_FIELD_UNSIZED(DukePlayer, DukePlayer, loogie)
DEFINE_FIELD_X(DukePlayer, DukePlayer, numloogs)
DEFINE_FIELD_X(DukePlayer, DukePlayer, loogcnt)
DEFINE_FIELD_X(DukePlayer, DukePlayer, invdisptime)
//DEFINE_FIELD_X(DukePlayer, player_struct, bobposx)
//DEFINE_FIELD_X(DukePlayer, player_struct, bobposy)
DEFINE_FIELD_X(DukePlayer, player_struct, pyoff)
DEFINE_FIELD_X(DukePlayer, player_struct, opyoff)
DEFINE_FIELD_X(DukePlayer, player_struct, vel)
DEFINE_FIELD_X(DukePlayer, player_struct, last_pissed_time)
DEFINE_FIELD_X(DukePlayer, player_struct, truefz)
DEFINE_FIELD_X(DukePlayer, player_struct, truecz)
DEFINE_FIELD_X(DukePlayer, player_struct, player_par)
DEFINE_FIELD_X(DukePlayer, player_struct, visibility)
DEFINE_FIELD_X(DukePlayer, player_struct, bobcounter)
DEFINE_FIELD_X(DukePlayer, player_struct, randomflamex)
DEFINE_FIELD_X(DukePlayer, player_struct, crack_time)
DEFINE_FIELD_X(DukePlayer, player_struct, aim_mode)
DEFINE_FIELD_X(DukePlayer, player_struct, ftt)
DEFINE_FIELD_X(DukePlayer, player_struct, cursector)
DEFINE_FIELD_X(DukePlayer, player_struct, last_extra)
DEFINE_FIELD_X(DukePlayer, player_struct, subweapon)
DEFINE_FIELD_X(DukePlayer, player_struct, ammo_amount)
DEFINE_FIELD_X(DukePlayer, player_struct, frag)
DEFINE_FIELD_X(DukePlayer, player_struct, fraggedself)
DEFINE_FIELD_X(DukePlayer, player_struct, curr_weapon)
DEFINE_FIELD_X(DukePlayer, player_struct, last_weapon)
DEFINE_FIELD_X(DukePlayer, player_struct, tipincs)
DEFINE_FIELD_X(DukePlayer, player_struct, wantweaponfire)
DEFINE_FIELD_X(DukePlayer, player_struct, holoduke_amount)
DEFINE_FIELD_X(DukePlayer, player_struct, hurt_delay)
DEFINE_FIELD_X(DukePlayer, player_struct, hbomb_hold_delay)
DEFINE_FIELD_X(DukePlayer, player_struct, jumping_counter)
DEFINE_FIELD_X(DukePlayer, player_struct, airleft)
DEFINE_FIELD_X(DukePlayer, player_struct, knee_incs)
DEFINE_FIELD_X(DukePlayer, player_struct, access_incs)
DEFINE_FIELD_X(DukePlayer, player_struct, ftq)
DEFINE_FIELD_X(DukePlayer, player_struct, access_wall)
DEFINE_FIELD_X(DukePlayer, player_struct, got_access)
DEFINE_FIELD_X(DukePlayer, player_struct, weapon_ang)
DEFINE_FIELD_X(DukePlayer, player_struct, firstaid_amount)
DEFINE_FIELD_X(DukePlayer, player_struct, actor)
DEFINE_FIELD_X(DukePlayer, player_struct, one_parallax_sectnum)
DEFINE_FIELD_X(DukePlayer, player_struct, over_shoulder_on)
DEFINE_FIELD_X(DukePlayer, player_struct, fist_incs)
DEFINE_FIELD_X(DukePlayer, player_struct, cheat_phase)
DEFINE_FIELD_X(DukePlayer, player_struct, extra_extra8)
DEFINE_FIELD_X(DukePlayer, player_struct, quick_kick)
DEFINE_FIELD_X(DukePlayer, player_struct, last_quick_kick)
DEFINE_FIELD_X(DukePlayer, player_struct, heat_amount)
DEFINE_FIELD_X(DukePlayer, player_struct, timebeforeexit)
DEFINE_FIELD_X(DukePlayer, player_struct, customexitsound)
DEFINE_FIELD_X(DukePlayer, player_struct, interface_toggle_flag)
DEFINE_FIELD_X(DukePlayer, player_struct, dead_flag)
DEFINE_FIELD_X(DukePlayer, player_struct, show_empty_weapon)
DEFINE_FIELD_X(DukePlayer, player_struct, scuba_amount)
DEFINE_FIELD_X(DukePlayer, player_struct, jetpack_amount)
DEFINE_FIELD_X(DukePlayer, player_struct, steroids_amount)
DEFINE_FIELD_X(DukePlayer, player_struct, shield_amount)
DEFINE_FIELD_X(DukePlayer, player_struct, pycount)
DEFINE_FIELD_X(DukePlayer, player_struct, frag_ps)
DEFINE_FIELD_X(DukePlayer, player_struct, transporter_hold)
DEFINE_FIELD_X(DukePlayer, player_struct, last_full_weapon)
DEFINE_FIELD_X(DukePlayer, player_struct, footprintshade)
DEFINE_FIELD_X(DukePlayer, player_struct, boot_amount)
DEFINE_FIELD_X(DukePlayer, player_struct, on_warping_sector)
DEFINE_FIELD_X(DukePlayer, player_struct, footprintcount)
DEFINE_FIELD_X(DukePlayer, player_struct, hbomb_on)
DEFINE_FIELD_X(DukePlayer, player_struct, jumping_toggle)
DEFINE_FIELD_X(DukePlayer, player_struct, rapid_fire_hold)
DEFINE_FIELD_X(DukePlayer, player_struct, on_ground)
DEFINE_FIELD_X(DukePlayer, player_struct, inven_icon)
DEFINE_FIELD_X(DukePlayer, player_struct, buttonpalette)
DEFINE_FIELD_X(DukePlayer, player_struct, jetpack_on)
DEFINE_FIELD_X(DukePlayer, player_struct, spritebridge)
DEFINE_FIELD_X(DukePlayer, player_struct, lastrandomspot)
DEFINE_FIELD_X(DukePlayer, player_struct, scuba_on)
DEFINE_FIELD_X(DukePlayer, player_struct, footprintpal)
DEFINE_FIELD_X(DukePlayer, player_struct, heat_on)
DEFINE_FIELD_X(DukePlayer, player_struct, holster_weapon)
DEFINE_FIELD_X(DukePlayer, player_struct, falling_counter)
DEFINE_FIELD_X(DukePlayer, player_struct, refresh_inventory)
DEFINE_FIELD_X(DukePlayer, player_struct, toggle_key_flag)
DEFINE_FIELD_X(DukePlayer, player_struct, knuckle_incs)
DEFINE_FIELD_X(DukePlayer, player_struct, walking_snd_toggle)
DEFINE_FIELD_X(DukePlayer, player_struct, palookup)
DEFINE_FIELD_X(DukePlayer, player_struct, quick_kick_msg)
DEFINE_FIELD_X(DukePlayer, player_struct, stairs)
DEFINE_FIELD_X(DukePlayer, player_struct, detonate_count)
DEFINE_FIELD_X(DukePlayer, DukePlayer, pyoff)
DEFINE_FIELD_X(DukePlayer, DukePlayer, opyoff)
DEFINE_FIELD_X(DukePlayer, DukePlayer, vel)
DEFINE_FIELD_X(DukePlayer, DukePlayer, last_pissed_time)
DEFINE_FIELD_X(DukePlayer, DukePlayer, truefz)
DEFINE_FIELD_X(DukePlayer, DukePlayer, truecz)
DEFINE_FIELD_X(DukePlayer, DukePlayer, player_par)
DEFINE_FIELD_X(DukePlayer, DukePlayer, visibility)
DEFINE_FIELD_X(DukePlayer, DukePlayer, bobcounter)
DEFINE_FIELD_X(DukePlayer, DukePlayer, randomflamex)
DEFINE_FIELD_X(DukePlayer, DukePlayer, crack_time)
DEFINE_FIELD_X(DukePlayer, DukePlayer, aim_mode)
DEFINE_FIELD_X(DukePlayer, DukePlayer, ftt)
DEFINE_FIELD_X(DukePlayer, DukePlayer, cursector)
DEFINE_FIELD_X(DukePlayer, DukePlayer, last_extra)
DEFINE_FIELD_X(DukePlayer, DukePlayer, subweapon)
DEFINE_FIELD_X(DukePlayer, DukePlayer, ammo_amount)
DEFINE_FIELD_X(DukePlayer, DukePlayer, frag)
DEFINE_FIELD_X(DukePlayer, DukePlayer, fraggedself)
DEFINE_FIELD_X(DukePlayer, DukePlayer, curr_weapon)
DEFINE_FIELD_X(DukePlayer, DukePlayer, last_weapon)
DEFINE_FIELD_X(DukePlayer, DukePlayer, tipincs)
DEFINE_FIELD_X(DukePlayer, DukePlayer, wantweaponfire)
DEFINE_FIELD_X(DukePlayer, DukePlayer, holoduke_amount)
DEFINE_FIELD_X(DukePlayer, DukePlayer, hurt_delay)
DEFINE_FIELD_X(DukePlayer, DukePlayer, hbomb_hold_delay)
DEFINE_FIELD_X(DukePlayer, DukePlayer, jumping_counter)
DEFINE_FIELD_X(DukePlayer, DukePlayer, airleft)
DEFINE_FIELD_X(DukePlayer, DukePlayer, knee_incs)
DEFINE_FIELD_X(DukePlayer, DukePlayer, access_incs)
DEFINE_FIELD_X(DukePlayer, DukePlayer, ftq)
DEFINE_FIELD_X(DukePlayer, DukePlayer, access_wall)
DEFINE_FIELD_X(DukePlayer, DukePlayer, got_access)
DEFINE_FIELD_X(DukePlayer, DukePlayer, weapon_ang)
DEFINE_FIELD_X(DukePlayer, DukePlayer, firstaid_amount)
DEFINE_FIELD_X(DukePlayer, DukePlayer, actor)
DEFINE_FIELD_X(DukePlayer, DukePlayer, one_parallax_sectnum)
DEFINE_FIELD_X(DukePlayer, DukePlayer, over_shoulder_on)
DEFINE_FIELD_X(DukePlayer, DukePlayer, fist_incs)
DEFINE_FIELD_X(DukePlayer, DukePlayer, cheat_phase)
DEFINE_FIELD_X(DukePlayer, DukePlayer, extra_extra8)
DEFINE_FIELD_X(DukePlayer, DukePlayer, quick_kick)
DEFINE_FIELD_X(DukePlayer, DukePlayer, last_quick_kick)
DEFINE_FIELD_X(DukePlayer, DukePlayer, heat_amount)
DEFINE_FIELD_X(DukePlayer, DukePlayer, timebeforeexit)
DEFINE_FIELD_X(DukePlayer, DukePlayer, customexitsound)
DEFINE_FIELD_X(DukePlayer, DukePlayer, interface_toggle_flag)
DEFINE_FIELD_X(DukePlayer, DukePlayer, dead_flag)
DEFINE_FIELD_X(DukePlayer, DukePlayer, show_empty_weapon)
DEFINE_FIELD_X(DukePlayer, DukePlayer, scuba_amount)
DEFINE_FIELD_X(DukePlayer, DukePlayer, jetpack_amount)
DEFINE_FIELD_X(DukePlayer, DukePlayer, steroids_amount)
DEFINE_FIELD_X(DukePlayer, DukePlayer, shield_amount)
DEFINE_FIELD_X(DukePlayer, DukePlayer, pycount)
DEFINE_FIELD_X(DukePlayer, DukePlayer, frag_ps)
DEFINE_FIELD_X(DukePlayer, DukePlayer, transporter_hold)
DEFINE_FIELD_X(DukePlayer, DukePlayer, last_full_weapon)
DEFINE_FIELD_X(DukePlayer, DukePlayer, footprintshade)
DEFINE_FIELD_X(DukePlayer, DukePlayer, boot_amount)
DEFINE_FIELD_X(DukePlayer, DukePlayer, on_warping_sector)
DEFINE_FIELD_X(DukePlayer, DukePlayer, footprintcount)
DEFINE_FIELD_X(DukePlayer, DukePlayer, hbomb_on)
DEFINE_FIELD_X(DukePlayer, DukePlayer, jumping_toggle)
DEFINE_FIELD_X(DukePlayer, DukePlayer, rapid_fire_hold)
DEFINE_FIELD_X(DukePlayer, DukePlayer, on_ground)
DEFINE_FIELD_X(DukePlayer, DukePlayer, inven_icon)
DEFINE_FIELD_X(DukePlayer, DukePlayer, buttonpalette)
DEFINE_FIELD_X(DukePlayer, DukePlayer, jetpack_on)
DEFINE_FIELD_X(DukePlayer, DukePlayer, spritebridge)
DEFINE_FIELD_X(DukePlayer, DukePlayer, lastrandomspot)
DEFINE_FIELD_X(DukePlayer, DukePlayer, scuba_on)
DEFINE_FIELD_X(DukePlayer, DukePlayer, footprintpal)
DEFINE_FIELD_X(DukePlayer, DukePlayer, heat_on)
DEFINE_FIELD_X(DukePlayer, DukePlayer, holster_weapon)
DEFINE_FIELD_X(DukePlayer, DukePlayer, falling_counter)
DEFINE_FIELD_X(DukePlayer, DukePlayer, refresh_inventory)
DEFINE_FIELD_X(DukePlayer, DukePlayer, toggle_key_flag)
DEFINE_FIELD_X(DukePlayer, DukePlayer, knuckle_incs)
DEFINE_FIELD_X(DukePlayer, DukePlayer, walking_snd_toggle)
DEFINE_FIELD_X(DukePlayer, DukePlayer, palookup)
DEFINE_FIELD_X(DukePlayer, DukePlayer, quick_kick_msg)
DEFINE_FIELD_X(DukePlayer, DukePlayer, stairs)
DEFINE_FIELD_X(DukePlayer, DukePlayer, detonate_count)
//DEFINE_FIELD_X(DukePlayer, player_struct, noise.X)
//DEFINE_FIELD_X(DukePlayer, player_struct, noise.Y)
DEFINE_FIELD_X(DukePlayer, player_struct, noise_radius)
DEFINE_FIELD_X(DukePlayer, player_struct, drink_timer)
DEFINE_FIELD_X(DukePlayer, player_struct, eat_timer)
DEFINE_FIELD_X(DukePlayer, player_struct, SlotWin)
DEFINE_FIELD_X(DukePlayer, player_struct, recoil)
DEFINE_FIELD_X(DukePlayer, player_struct, detonate_time)
DEFINE_FIELD_X(DukePlayer, player_struct, yehaa_timer)
DEFINE_FIELD_X(DukePlayer, player_struct, drink_amt)
DEFINE_FIELD_X(DukePlayer, player_struct, eat)
DEFINE_FIELD_X(DukePlayer, player_struct, drunkang)
DEFINE_FIELD_X(DukePlayer, player_struct, eatang)
DEFINE_FIELD_X(DukePlayer, player_struct, shotgun_state)
DEFINE_FIELD_X(DukePlayer, player_struct, donoise)
DEFINE_FIELD_X(DukePlayer, player_struct, keys)
DEFINE_FIELD_X(DukePlayer, player_struct, drug_aspect)
DEFINE_FIELD_X(DukePlayer, player_struct, drug_timer)
DEFINE_FIELD_X(DukePlayer, player_struct, SeaSick)
DEFINE_FIELD_X(DukePlayer, player_struct, MamaEnd)
DEFINE_FIELD_X(DukePlayer, player_struct, moto_drink)
DEFINE_FIELD_X(DukePlayer, player_struct, TiltStatus)
DEFINE_FIELD_X(DukePlayer, player_struct, oTiltStatus)
DEFINE_FIELD_X(DukePlayer, player_struct, VBumpNow)
DEFINE_FIELD_X(DukePlayer, player_struct, VBumpTarget)
DEFINE_FIELD_X(DukePlayer, player_struct, TurbCount)
DEFINE_FIELD_X(DukePlayer, player_struct, drug_stat)
DEFINE_FIELD_X(DukePlayer, player_struct, DrugMode)
DEFINE_FIELD_X(DukePlayer, player_struct, lotag800kill)
DEFINE_FIELD_X(DukePlayer, player_struct, sea_sick_stat)
DEFINE_FIELD_X(DukePlayer, player_struct, hurt_delay2)
DEFINE_FIELD_X(DukePlayer, player_struct, nocheat)
DEFINE_FIELD_X(DukePlayer, player_struct, OnMotorcycle)
DEFINE_FIELD_X(DukePlayer, player_struct, OnBoat)
DEFINE_FIELD_X(DukePlayer, player_struct, moto_underwater)
DEFINE_FIELD_X(DukePlayer, player_struct, NotOnWater)
DEFINE_FIELD_X(DukePlayer, player_struct, MotoOnGround)
DEFINE_FIELD_X(DukePlayer, player_struct, moto_do_bump)
DEFINE_FIELD_X(DukePlayer, player_struct, moto_bump_fast)
DEFINE_FIELD_X(DukePlayer, player_struct, moto_on_oil)
DEFINE_FIELD_X(DukePlayer, player_struct, moto_on_mud)
DEFINE_FIELD_X(DukePlayer, player_struct, MotoSpeed)
DEFINE_FIELD_X(DukePlayer, player_struct, holoduke_on)
DEFINE_FIELD_X(DukePlayer, player_struct, actorsqu)
DEFINE_FIELD_X(DukePlayer, player_struct, wackedbyactor)
DEFINE_FIELD_X(DukePlayer, player_struct, on_crane)
DEFINE_FIELD_X(DukePlayer, player_struct, somethingonplayer)
DEFINE_FIELD_X(DukePlayer, player_struct, access_spritenum)
DEFINE_FIELD_X(DukePlayer, player_struct, dummyplayersprite)
DEFINE_FIELD_X(DukePlayer, player_struct, newOwner)
DEFINE_FIELD_X(DukePlayer, player_struct, fric)
DEFINE_FIELD_X(DukePlayer, DukePlayer, noise_radius)
DEFINE_FIELD_X(DukePlayer, DukePlayer, drink_timer)
DEFINE_FIELD_X(DukePlayer, DukePlayer, eat_timer)
DEFINE_FIELD_X(DukePlayer, DukePlayer, SlotWin)
DEFINE_FIELD_X(DukePlayer, DukePlayer, recoil)
DEFINE_FIELD_X(DukePlayer, DukePlayer, detonate_time)
DEFINE_FIELD_X(DukePlayer, DukePlayer, yehaa_timer)
DEFINE_FIELD_X(DukePlayer, DukePlayer, drink_amt)
DEFINE_FIELD_X(DukePlayer, DukePlayer, eat)
DEFINE_FIELD_X(DukePlayer, DukePlayer, drunkang)
DEFINE_FIELD_X(DukePlayer, DukePlayer, eatang)
DEFINE_FIELD_X(DukePlayer, DukePlayer, shotgun_state)
DEFINE_FIELD_X(DukePlayer, DukePlayer, donoise)
DEFINE_FIELD_X(DukePlayer, DukePlayer, keys)
DEFINE_FIELD_X(DukePlayer, DukePlayer, drug_aspect)
DEFINE_FIELD_X(DukePlayer, DukePlayer, drug_timer)
DEFINE_FIELD_X(DukePlayer, DukePlayer, SeaSick)
DEFINE_FIELD_X(DukePlayer, DukePlayer, MamaEnd)
DEFINE_FIELD_X(DukePlayer, DukePlayer, moto_drink)
DEFINE_FIELD_X(DukePlayer, DukePlayer, TiltStatus)
DEFINE_FIELD_X(DukePlayer, DukePlayer, oTiltStatus)
DEFINE_FIELD_X(DukePlayer, DukePlayer, VBumpNow)
DEFINE_FIELD_X(DukePlayer, DukePlayer, VBumpTarget)
DEFINE_FIELD_X(DukePlayer, DukePlayer, TurbCount)
DEFINE_FIELD_X(DukePlayer, DukePlayer, drug_stat)
DEFINE_FIELD_X(DukePlayer, DukePlayer, DrugMode)
DEFINE_FIELD_X(DukePlayer, DukePlayer, lotag800kill)
DEFINE_FIELD_X(DukePlayer, DukePlayer, sea_sick_stat)
DEFINE_FIELD_X(DukePlayer, DukePlayer, hurt_delay2)
DEFINE_FIELD_X(DukePlayer, DukePlayer, nocheat)
DEFINE_FIELD_X(DukePlayer, DukePlayer, OnMotorcycle)
DEFINE_FIELD_X(DukePlayer, DukePlayer, OnBoat)
DEFINE_FIELD_X(DukePlayer, DukePlayer, moto_underwater)
DEFINE_FIELD_X(DukePlayer, DukePlayer, NotOnWater)
DEFINE_FIELD_X(DukePlayer, DukePlayer, MotoOnGround)
DEFINE_FIELD_X(DukePlayer, DukePlayer, moto_do_bump)
DEFINE_FIELD_X(DukePlayer, DukePlayer, moto_bump_fast)
DEFINE_FIELD_X(DukePlayer, DukePlayer, moto_on_oil)
DEFINE_FIELD_X(DukePlayer, DukePlayer, moto_on_mud)
DEFINE_FIELD_X(DukePlayer, DukePlayer, MotoSpeed)
DEFINE_FIELD_X(DukePlayer, DukePlayer, holoduke_on)
DEFINE_FIELD_X(DukePlayer, DukePlayer, actorsqu)
DEFINE_FIELD_X(DukePlayer, DukePlayer, wackedbyactor)
DEFINE_FIELD_X(DukePlayer, DukePlayer, on_crane)
DEFINE_FIELD_X(DukePlayer, DukePlayer, somethingonplayer)
DEFINE_FIELD_X(DukePlayer, DukePlayer, access_spritenum)
DEFINE_FIELD_X(DukePlayer, DukePlayer, dummyplayersprite)
DEFINE_FIELD_X(DukePlayer, DukePlayer, newOwner)
DEFINE_FIELD_X(DukePlayer, DukePlayer, fric)
DEFINE_ACTION_FUNCTION(_DukePlayer, IsFrozen)
{
PARAM_SELF_STRUCT_PROLOGUE(player_struct);
PARAM_SELF_STRUCT_PROLOGUE(DukePlayer);
ACTION_RETURN_BOOL(self->GetActor()->spr.pal == 1 && self->last_extra < 2);
}
DEFINE_ACTION_FUNCTION(_DukePlayer, GetGameVar)
{
PARAM_SELF_STRUCT_PROLOGUE(player_struct);
PARAM_SELF_STRUCT_PROLOGUE(DukePlayer);
PARAM_STRING(name);
PARAM_INT(def);
ACTION_RETURN_INT(GetGameVar(name, def, self->GetActor(), self->GetPlayerNum()).safeValue());
}
void dukeplayer_backuppos(player_struct* self)
void dukeplayer_backuppos(DukePlayer* self)
{
self->backuppos();
}
DEFINE_ACTION_FUNCTION_NATIVE(_DukePlayer, backuppos, dukeplayer_backuppos)
{
PARAM_SELF_STRUCT_PROLOGUE(player_struct);
PARAM_SELF_STRUCT_PROLOGUE(DukePlayer);
dukeplayer_backuppos(self);
return 0;
}
void dukeplayer_backupxyz(player_struct* self)
void dukeplayer_backupxyz(DukePlayer* self)
{
self->GetActor()->backuppos();
}
DEFINE_ACTION_FUNCTION_NATIVE(_DukePlayer, backupxyz, dukeplayer_backupxyz)
{
PARAM_SELF_STRUCT_PROLOGUE(player_struct);
PARAM_SELF_STRUCT_PROLOGUE(DukePlayer);
dukeplayer_backupxyz(self);
return 0;
}
void dukeplayer_setpos(player_struct* self, double x, double y, double z)
void dukeplayer_setpos(DukePlayer* self, double x, double y, double z)
{
self->GetActor()->spr.pos = { x, y, z + self->GetActor()->viewzoffset };
}
DEFINE_ACTION_FUNCTION_NATIVE(_DukePlayer, setpos, dukeplayer_setpos)
{
PARAM_SELF_STRUCT_PROLOGUE(player_struct);
PARAM_SELF_STRUCT_PROLOGUE(DukePlayer);
PARAM_FLOAT(x);
PARAM_FLOAT(y);
PARAM_FLOAT(z);
@ -1161,14 +1161,14 @@ DEFINE_ACTION_FUNCTION_NATIVE(_DukePlayer, setpos, dukeplayer_setpos)
return 0;
}
void dukeplayer_addpos(player_struct* self, double x, double y, double z)
void dukeplayer_addpos(DukePlayer* self, double x, double y, double z)
{
self->GetActor()->spr.pos += { x, y, z };
}
DEFINE_ACTION_FUNCTION_NATIVE(_DukePlayer, addpos, dukeplayer_addpos)
{
PARAM_SELF_STRUCT_PROLOGUE(player_struct);
PARAM_SELF_STRUCT_PROLOGUE(DukePlayer);
PARAM_FLOAT(x);
PARAM_FLOAT(y);
PARAM_FLOAT(z);
@ -1176,31 +1176,31 @@ DEFINE_ACTION_FUNCTION_NATIVE(_DukePlayer, addpos, dukeplayer_addpos)
return 0;
}
void dukeplayer_centerview(player_struct* self)
void dukeplayer_centerview(DukePlayer* self)
{
self->input.actions |= SB_CENTERVIEW;
}
DEFINE_ACTION_FUNCTION_NATIVE(_DukePlayer, centerview, dukeplayer_centerview)
{
PARAM_SELF_STRUCT_PROLOGUE(player_struct);
PARAM_SELF_STRUCT_PROLOGUE(DukePlayer);
self->input.actions |= SB_CENTERVIEW;
return 0;
}
inline int DukePlayer_PlayerInput(player_struct* pl, int bit)
inline int DukePlayer_PlayerInput(DukePlayer* pl, int bit)
{
return (!!((pl->input.actions) & ESyncBits::FromInt(bit)));
}
DEFINE_ACTION_FUNCTION_NATIVE(_DukePlayer, playerinput, DukePlayer_PlayerInput)
{
PARAM_SELF_STRUCT_PROLOGUE(player_struct);
PARAM_SELF_STRUCT_PROLOGUE(DukePlayer);
PARAM_INT(bit);
ACTION_RETURN_INT(DukePlayer_PlayerInput(self, bit));
}
void dukeplayer_settargetangle(player_struct* self, double a, int backup)
void dukeplayer_settargetangle(DukePlayer* self, double a, int backup)
{
self->GetActor()->spr.Angles.Yaw = DAngle::fromDeg(a);
if (backup) self->GetActor()->PrevAngles.Yaw = self->GetActor()->spr.Angles.Yaw;
@ -1208,32 +1208,32 @@ void dukeplayer_settargetangle(player_struct* self, double a, int backup)
DEFINE_ACTION_FUNCTION_NATIVE(_DukePlayer, settargetangle, dukeplayer_settargetangle)
{
PARAM_SELF_STRUCT_PROLOGUE(player_struct);
PARAM_SELF_STRUCT_PROLOGUE(DukePlayer);
PARAM_FLOAT(a);
PARAM_BOOL(bak);
dukeplayer_settargetangle(self, a, bak);
return 0;
}
double dukeplayer_angle(player_struct* self)
double dukeplayer_angle(DukePlayer* self)
{
return self->GetActor()->spr.Angles.Yaw.Degrees();
}
DEFINE_ACTION_FUNCTION_NATIVE(_DukePlayer, angle, dukeplayer_angle)
{
PARAM_SELF_STRUCT_PROLOGUE(player_struct);
PARAM_SELF_STRUCT_PROLOGUE(DukePlayer);
ACTION_RETURN_FLOAT(dukeplayer_angle(self));
}
void dukeplayer_addpitch(player_struct* self, double a)
void dukeplayer_addpitch(DukePlayer* self, double a)
{
self->GetActor()->spr.Angles.Pitch += DAngle::fromDeg(a);
}
DEFINE_ACTION_FUNCTION_NATIVE(_DukePlayer, addpitch, dukeplayer_addpitch)
{
PARAM_SELF_STRUCT_PROLOGUE(player_struct);
PARAM_SELF_STRUCT_PROLOGUE(DukePlayer);
PARAM_FLOAT(a);
dukeplayer_addpitch(self, a);
return 0;
@ -1241,27 +1241,27 @@ DEFINE_ACTION_FUNCTION_NATIVE(_DukePlayer, addpitch, dukeplayer_addpitch)
DEFINE_ACTION_FUNCTION_NATIVE(_DukePlayer, clearcameras, clearcameras)
{
PARAM_SELF_STRUCT_PROLOGUE(player_struct);
PARAM_SELF_STRUCT_PROLOGUE(DukePlayer);
clearcameras(self);
return 0;
}
DEFINE_ACTION_FUNCTION_NATIVE(_DukePlayer, quickkill, quickkill)
{
PARAM_SELF_STRUCT_PROLOGUE(player_struct);
PARAM_SELF_STRUCT_PROLOGUE(DukePlayer);
quickkill(self);
return 0;
}
DEFINE_ACTION_FUNCTION_NATIVE(_DukePlayer, CheckWeapRec, CheckWeapRec)
{
PARAM_SELF_STRUCT_PROLOGUE(player_struct);
PARAM_SELF_STRUCT_PROLOGUE(DukePlayer);
PARAM_POINTER(ac, DDukeActor);
PARAM_BOOL(test);
ACTION_RETURN_INT(CheckWeapRec(self, ac, test));
}
void DukePlayer_addammo(player_struct* p, int ammo, int amount)
void DukePlayer_addammo(DukePlayer* p, int ammo, int amount)
{
if ((unsigned)ammo >= MAX_WEAPONS) ThrowAbortException(X_ARRAY_OUT_OF_BOUNDS, "Ammo number out of range");
addammo(ammo, p, amount);
@ -1269,14 +1269,14 @@ void DukePlayer_addammo(player_struct* p, int ammo, int amount)
DEFINE_ACTION_FUNCTION_NATIVE(_DukePlayer, addammo, DukePlayer_addammo)
{
PARAM_SELF_STRUCT_PROLOGUE(player_struct);
PARAM_SELF_STRUCT_PROLOGUE(DukePlayer);
PARAM_INT(type);
PARAM_INT(amount);
DukePlayer_addammo(self, type, amount);
return 0;
}
void DukePlayer_addweapon(player_struct* p, int wpn, int switchit)
void DukePlayer_addweapon(DukePlayer* p, int wpn, int switchit)
{
if ((unsigned)wpn >= MAX_WEAPONS) ThrowAbortException(X_ARRAY_OUT_OF_BOUNDS, "Weapon number out of range");
fi.addweapon(p, wpn, switchit);
@ -1284,7 +1284,7 @@ void DukePlayer_addweapon(player_struct* p, int wpn, int switchit)
DEFINE_ACTION_FUNCTION_NATIVE(_DukePlayer, addweapon, DukePlayer_addweapon)
{
PARAM_SELF_STRUCT_PROLOGUE(player_struct);
PARAM_SELF_STRUCT_PROLOGUE(DukePlayer);
PARAM_INT(type);
PARAM_INT(switchit);
DukePlayer_addweapon(self, type, switchit);
@ -1294,57 +1294,57 @@ DEFINE_ACTION_FUNCTION_NATIVE(_DukePlayer, addweapon, DukePlayer_addweapon)
DEFINE_ACTION_FUNCTION(_DukePlayer, hitablockingwall)
{
PARAM_SELF_STRUCT_PROLOGUE(player_struct);
PARAM_SELF_STRUCT_PROLOGUE(DukePlayer);
walltype* pwal;
hitawall(self, &pwal);
ACTION_RETURN_BOOL(pwal && pwal->overtexture.isValid());
}
inline double DukePlayer_GetPitchwithView(player_struct* pl)
inline double DukePlayer_GetPitchwithView(DukePlayer* pl)
{
return pl->Angles.getPitchWithView().Degrees();
}
DEFINE_ACTION_FUNCTION_NATIVE(_DukePlayer, GetPitchwithView, DukePlayer_GetPitchwithView)
{
PARAM_SELF_STRUCT_PROLOGUE(player_struct);
PARAM_SELF_STRUCT_PROLOGUE(DukePlayer);
ACTION_RETURN_FLOAT(DukePlayer_GetPitchwithView(self));
}
inline void DukePlayer_setbobpos(player_struct* pl)
inline void DukePlayer_setbobpos(DukePlayer* pl)
{
return pl->setbobpos();
}
DEFINE_ACTION_FUNCTION_NATIVE(_DukePlayer, setbobpos, DukePlayer_setbobpos)
{
PARAM_SELF_STRUCT_PROLOGUE(player_struct);
PARAM_SELF_STRUCT_PROLOGUE(DukePlayer);
self->setbobpos();
return 0;
}
DEFINE_ACTION_FUNCTION_NATIVE(_DukePlayer, StartMotorcycle, OnMotorcycle)
{
PARAM_SELF_STRUCT_PROLOGUE(player_struct);
PARAM_SELF_STRUCT_PROLOGUE(DukePlayer);
OnMotorcycle(self);
return 0;
}
DEFINE_ACTION_FUNCTION_NATIVE(_DukePlayer, StartBoat, OnBoat)
{
PARAM_SELF_STRUCT_PROLOGUE(player_struct);
PARAM_SELF_STRUCT_PROLOGUE(DukePlayer);
OnBoat(self);
return 0;
}
void pl_checkhitswitch(player_struct* p, walltype* wal, DDukeActor* act)
void pl_checkhitswitch(DukePlayer* p, walltype* wal, DDukeActor* act)
{
checkhitswitch(p->GetPlayerNum(), wal, act);
}
DEFINE_ACTION_FUNCTION_NATIVE(_DukePlayer, checkhitswitch, pl_checkhitswitch)
{
PARAM_SELF_STRUCT_PROLOGUE(player_struct);
PARAM_SELF_STRUCT_PROLOGUE(DukePlayer);
PARAM_POINTER(wal, walltype);
PARAM_POINTER(act, DDukeActor);
pl_checkhitswitch(self, wal, act);
@ -1353,7 +1353,7 @@ DEFINE_ACTION_FUNCTION_NATIVE(_DukePlayer, checkhitswitch, pl_checkhitswitch)
DEFINE_ACTION_FUNCTION_NATIVE(_DukePlayer, playerkick, playerkick)
{
PARAM_SELF_STRUCT_PROLOGUE(player_struct);
PARAM_SELF_STRUCT_PROLOGUE(DukePlayer);
PARAM_POINTER(act, DDukeActor);
playerkick(self, act);
return 0;
@ -1361,7 +1361,7 @@ DEFINE_ACTION_FUNCTION_NATIVE(_DukePlayer, playerkick, playerkick)
DEFINE_ACTION_FUNCTION_NATIVE(_DukePlayer, playerstomp, playerstomp)
{
PARAM_SELF_STRUCT_PROLOGUE(player_struct);
PARAM_SELF_STRUCT_PROLOGUE(DukePlayer);
PARAM_POINTER(act, DDukeActor);
playerstomp(self, act);
return 0;
@ -1369,7 +1369,7 @@ DEFINE_ACTION_FUNCTION_NATIVE(_DukePlayer, playerstomp, playerstomp)
DEFINE_ACTION_FUNCTION_NATIVE(_DukePlayer, playerreset, playerreset)
{
PARAM_SELF_STRUCT_PROLOGUE(player_struct);
PARAM_SELF_STRUCT_PROLOGUE(DukePlayer);
PARAM_POINTER(act, DDukeActor);
playerreset(self, act);
return 0;
@ -1377,7 +1377,7 @@ DEFINE_ACTION_FUNCTION_NATIVE(_DukePlayer, playerreset, playerreset)
DEFINE_ACTION_FUNCTION_NATIVE(_DukePlayer, addphealth, addphealth)
{
PARAM_SELF_STRUCT_PROLOGUE(player_struct);
PARAM_SELF_STRUCT_PROLOGUE(DukePlayer);
PARAM_INT(amt);
PARAM_INT(big);
addphealth(self, amt, big);
@ -1386,30 +1386,30 @@ DEFINE_ACTION_FUNCTION_NATIVE(_DukePlayer, addphealth, addphealth)
DEFINE_ACTION_FUNCTION_NATIVE(_DukePlayer, wackplayer, wackplayer)
{
PARAM_SELF_STRUCT_PROLOGUE(player_struct);
PARAM_SELF_STRUCT_PROLOGUE(DukePlayer);
wackplayer(self);
return 0;
}
static void duke_checkweapons(player_struct* p)
static void duke_checkweapons(DukePlayer* p)
{
fi.checkweapons(p);
}
DEFINE_ACTION_FUNCTION_NATIVE(_DukePlayer, checkweapons, duke_checkweapons)
{
PARAM_SELF_STRUCT_PROLOGUE(player_struct);
PARAM_SELF_STRUCT_PROLOGUE(DukePlayer);
duke_checkweapons(self);
return 0;
}
static void msg(player_struct* p, int num)
static void msg(DukePlayer* p, int num)
{
FTA(num, p);
}
DEFINE_ACTION_FUNCTION_NATIVE(_DukePlayer, FTA, msg)
{
PARAM_SELF_STRUCT_PROLOGUE(player_struct);
PARAM_SELF_STRUCT_PROLOGUE(DukePlayer);
PARAM_INT(num);
FTA(num, self);
return 0;
@ -1417,7 +1417,7 @@ DEFINE_ACTION_FUNCTION_NATIVE(_DukePlayer, FTA, msg)
DEFINE_ACTION_FUNCTION_NATIVE(_DukePlayer, playercheckinventory, playercheckinventory)
{
PARAM_SELF_STRUCT_PROLOGUE(player_struct);
PARAM_SELF_STRUCT_PROLOGUE(DukePlayer);
PARAM_POINTER(act, DDukeActor);
PARAM_INT(num);
PARAM_INT(amt);
@ -1426,7 +1426,7 @@ DEFINE_ACTION_FUNCTION_NATIVE(_DukePlayer, playercheckinventory, playercheckinve
DEFINE_ACTION_FUNCTION_NATIVE(_DukePlayer, playeraddinventory, playeraddinventory)
{
PARAM_SELF_STRUCT_PROLOGUE(player_struct);
PARAM_SELF_STRUCT_PROLOGUE(DukePlayer);
PARAM_POINTER(act, DDukeActor);
PARAM_INT(num);
PARAM_INT(amt);
@ -1436,7 +1436,7 @@ DEFINE_ACTION_FUNCTION_NATIVE(_DukePlayer, playeraddinventory, playeraddinventor
DEFINE_ACTION_FUNCTION_NATIVE(_DukePlayer, playeraddweapon, playeraddweapon)
{
PARAM_SELF_STRUCT_PROLOGUE(player_struct);
PARAM_SELF_STRUCT_PROLOGUE(DukePlayer);
PARAM_INT(num);
PARAM_INT(amt);
ACTION_RETURN_BOOL(playeraddweapon(self, num, amt));
@ -1444,7 +1444,7 @@ DEFINE_ACTION_FUNCTION_NATIVE(_DukePlayer, playeraddweapon, playeraddweapon)
DEFINE_ACTION_FUNCTION_NATIVE(_DukePlayer, playeraddammo, playeraddammo)
{
PARAM_SELF_STRUCT_PROLOGUE(player_struct);
PARAM_SELF_STRUCT_PROLOGUE(DukePlayer);
PARAM_INT(num);
PARAM_INT(amt);
ACTION_RETURN_BOOL(playeraddammo(self, num, amt));
@ -1452,14 +1452,14 @@ DEFINE_ACTION_FUNCTION_NATIVE(_DukePlayer, playeraddammo, playeraddammo)
DEFINE_ACTION_FUNCTION_NATIVE(_DukePlayer, forceplayerangle, forceplayerangle)
{
PARAM_SELF_STRUCT_PROLOGUE(player_struct);
PARAM_SELF_STRUCT_PROLOGUE(DukePlayer);
forceplayerangle(self);
return 0;
}
DEFINE_ACTION_FUNCTION_NATIVE(_DukePlayer, playereat, playereat)
{
PARAM_SELF_STRUCT_PROLOGUE(player_struct);
PARAM_SELF_STRUCT_PROLOGUE(DukePlayer);
PARAM_INT(amt);
PARAM_BOOL(big);
ACTION_RETURN_BOOL(playereat(self, amt, big));
@ -1467,7 +1467,7 @@ DEFINE_ACTION_FUNCTION_NATIVE(_DukePlayer, playereat, playereat)
DEFINE_ACTION_FUNCTION_NATIVE(_DukePlayer, playerdrink, playerdrink)
{
PARAM_SELF_STRUCT_PROLOGUE(player_struct);
PARAM_SELF_STRUCT_PROLOGUE(DukePlayer);
PARAM_INT(amt);
playerdrink(self, amt);
return 0;
@ -1589,7 +1589,7 @@ DEFINE_ACTION_FUNCTION_NATIVE(_DukeLevel, operateactivators, operateactivators)
{
PARAM_PROLOGUE;
PARAM_INT(lotag);
PARAM_POINTER(p, player_struct);
PARAM_POINTER(p, DukePlayer);
operateactivators(lotag, p);
return 0;
}