- renamed PLAYERstruct.

This commit is contained in:
Christoph Oelckers 2021-12-31 15:57:55 +01:00
parent 392397c2b0
commit 69b5d502e2
3 changed files with 121 additions and 122 deletions

View file

@ -370,12 +370,11 @@ typedef STATE* STATEp;
struct PANEL_STATE;
struct PLAYERstruct;
typedef struct PLAYERstruct PLAYER, *PLAYERp;
struct PLAYER;
typedef PLAYER *PLAYERp;
struct PERSONALITY;
struct ATTRIBUTE;
struct SECTOR_OBJECT;
struct PANEL_SPRITE;
struct ANIM;
@ -580,7 +579,7 @@ struct REMOTE_CONTROL
SECTOR_OBJECT* sop_control;
};
struct PLAYERstruct
struct PLAYER
{
// variable that fit in the sprite or user structure
vec3_t pos, opos, oldpos;

View file

@ -7068,141 +7068,141 @@ saveable_module saveable_player =
SIZ(saveable_player_data)
};
DEFINE_FIELD_X(SWPlayer, PLAYERstruct, sop_remote)
DEFINE_FIELD_X(SWPlayer, PLAYERstruct, jump_count)
DEFINE_FIELD_X(SWPlayer, PLAYERstruct, jump_speed)
DEFINE_FIELD_X(SWPlayer, PLAYERstruct, down_speed)
DEFINE_FIELD_X(SWPlayer, PLAYERstruct, up_speed)
DEFINE_FIELD_X(SWPlayer, PLAYERstruct, z_speed)
DEFINE_FIELD_X(SWPlayer, PLAYERstruct, oz_speed)
DEFINE_FIELD_X(SWPlayer, PLAYERstruct, climb_ndx)
DEFINE_FIELD_X(SWPlayer, PLAYERstruct, hiz)
DEFINE_FIELD_X(SWPlayer, PLAYERstruct, loz)
DEFINE_FIELD_X(SWPlayer, PLAYERstruct, ceiling_dist)
DEFINE_FIELD_X(SWPlayer, PLAYERstruct, floor_dist)
DEFINE_FIELD_X(SWPlayer, PLAYERstruct, circle_camera_dist)
//DEFINE_FIELD_X(SWPlayer, PLAYERstruct, six)
//DEFINE_FIELD_X(SWPlayer, PLAYERstruct, siy)
//DEFINE_FIELD_X(SWPlayer, PLAYERstruct, siz)
DEFINE_FIELD_X(SWPlayer, PLAYERstruct, siang)
//DEFINE_FIELD_X(SWPlayer, PLAYERstruct, xvect)
//DEFINE_FIELD_X(SWPlayer, PLAYERstruct, yvect)
//DEFINE_FIELD_X(SWPlayer, PLAYERstruct, oxvect)
//DEFINE_FIELD_X(SWPlayer, PLAYERstruct, oyvect)
DEFINE_FIELD_X(SWPlayer, PLAYERstruct, friction)
//DEFINE_FIELD_X(SWPlayer, PLAYERstruct, slide_xvect)
//DEFINE_FIELD_X(SWPlayer, PLAYERstruct, slide_yvect)
DEFINE_FIELD_X(SWPlayer, PLAYERstruct, slide_ang)
DEFINE_FIELD_X(SWPlayer, PLAYERstruct, slide_dec)
DEFINE_FIELD_X(SWPlayer, PLAYERstruct, drive_avel)
DEFINE_FIELD_X(SWPlayer, PLAYERstruct, view_outside_dang)
DEFINE_FIELD_X(SWPlayer, PLAYERstruct, circle_camera_ang)
DEFINE_FIELD_X(SWPlayer, PLAYERstruct, camera_check_time_delay)
DEFINE_FIELD_X(SWPlayer, PLAYERstruct, cursector)
DEFINE_FIELD_X(SWPlayer, PLAYERstruct, lastcursector)
DEFINE_FIELD_X(SWPlayer, PLAYERstruct, hvel)
DEFINE_FIELD_X(SWPlayer, PLAYERstruct, tilt)
DEFINE_FIELD_X(SWPlayer, PLAYERstruct, tilt_dest)
DEFINE_FIELD_X(SWPlayer, PLAYERstruct, recoil_amt)
DEFINE_FIELD_X(SWPlayer, PLAYERstruct, recoil_speed)
DEFINE_FIELD_X(SWPlayer, PLAYERstruct, recoil_ndx)
DEFINE_FIELD_X(SWPlayer, PLAYERstruct, recoil_horizoff)
DEFINE_FIELD_X(SWPlayer, PLAYERstruct, recoil_ohorizoff)
//DEFINE_FIELD_X(SWPlayer, PLAYERstruct, oldposx)
//DEFINE_FIELD_X(SWPlayer, PLAYERstruct, oldposy)
//DEFINE_FIELD_X(SWPlayer, PLAYERstruct, oldposz)
//DEFINE_FIELD_X(SWPlayer, PLAYERstruct, Revolve.X)
//DEFINE_FIELD_X(SWPlayer, PLAYERstruct, Revolve.Y)
DEFINE_FIELD_X(SWPlayer, PLAYERstruct, RevolveDeltaAng)
DEFINE_FIELD_X(SWPlayer, PLAYERstruct, pnum)
DEFINE_FIELD_X(SWPlayer, PLAYERstruct, LadderSector)
//DEFINE_FIELD_X(SWPlayer, PLAYERstruct, lx)
//DEFINE_FIELD_X(SWPlayer, PLAYERstruct, ly)
DEFINE_FIELD_X(SWPlayer, PLAYERstruct, JumpDuration)
DEFINE_FIELD_X(SWPlayer, PLAYERstruct, WadeDepth)
DEFINE_FIELD_X(SWPlayer, PLAYERstruct, bob_amt)
DEFINE_FIELD_X(SWPlayer, PLAYERstruct, bob_ndx)
DEFINE_FIELD_X(SWPlayer, PLAYERstruct, bcnt)
DEFINE_FIELD_X(SWPlayer, PLAYERstruct, bob_z)
DEFINE_FIELD_X(SWPlayer, PLAYERstruct, obob_z)
DEFINE_FIELD_X(SWPlayer, PLAYERstruct, playerreadyflag)
DEFINE_FIELD_X(SWPlayer, PLAYERstruct, Flags)
DEFINE_FIELD_X(SWPlayer, PLAYERstruct, Flags2)
DEFINE_FIELD_X(SWPlayer, PLAYERstruct, HasKey)
DEFINE_FIELD_X(SWPlayer, PLAYERstruct, SwordAng)
DEFINE_FIELD_X(SWPlayer, PLAYERstruct, WpnGotOnceFlags)
DEFINE_FIELD_X(SWPlayer, PLAYERstruct, WpnFlags)
DEFINE_FIELD_X(SWPlayer, PLAYERstruct, WpnAmmo)
DEFINE_FIELD_X(SWPlayer, PLAYERstruct, WpnNum)
DEFINE_FIELD_X(SWPlayer, PLAYERstruct, WpnRocketType)
DEFINE_FIELD_X(SWPlayer, PLAYERstruct, WpnRocketHeat)
DEFINE_FIELD_X(SWPlayer, PLAYERstruct, WpnRocketNuke)
DEFINE_FIELD_X(SWPlayer, PLAYERstruct, WpnFlameType)
DEFINE_FIELD_X(SWPlayer, PLAYERstruct, WpnFirstType)
DEFINE_FIELD_X(SWPlayer, PLAYERstruct, WeaponType)
DEFINE_FIELD_X(SWPlayer, PLAYERstruct, FirePause)
DEFINE_FIELD_X(SWPlayer, PLAYERstruct, InventoryNum)
DEFINE_FIELD_X(SWPlayer, PLAYERstruct, InventoryBarTics)
DEFINE_FIELD_X(SWPlayer, PLAYERstruct, InventoryTics)
DEFINE_FIELD_X(SWPlayer, PLAYERstruct, InventoryPercent)
DEFINE_FIELD_X(SWPlayer, PLAYERstruct, InventoryAmount)
DEFINE_FIELD_X(SWPlayer, PLAYERstruct, InventoryActive)
DEFINE_FIELD_X(SWPlayer, PLAYERstruct, DiveTics)
DEFINE_FIELD_X(SWPlayer, PLAYERstruct, DiveDamageTics)
DEFINE_FIELD_X(SWPlayer, PLAYERstruct, DeathType)
DEFINE_FIELD_X(SWPlayer, PLAYERstruct, Kills)
DEFINE_FIELD_X(SWPlayer, PLAYERstruct, SecretsFound)
DEFINE_FIELD_X(SWPlayer, PLAYERstruct, Armor)
DEFINE_FIELD_X(SWPlayer, PLAYERstruct, MaxHealth)
DEFINE_FIELD_X(SWPlayer, PLAYERstruct, UziShellLeftAlt)
DEFINE_FIELD_X(SWPlayer, PLAYERstruct, UziShellRightAlt)
DEFINE_FIELD_X(SWPlayer, PLAYERstruct, TeamColor)
DEFINE_FIELD_X(SWPlayer, PLAYERstruct, FadeTics)
DEFINE_FIELD_X(SWPlayer, PLAYERstruct, FadeAmt)
DEFINE_FIELD_X(SWPlayer, PLAYERstruct, NightVision)
DEFINE_FIELD_X(SWPlayer, PLAYERstruct, StartColor)
DEFINE_FIELD_X(SWPlayer, PLAYERstruct, IsAI)
DEFINE_FIELD_X(SWPlayer, PLAYERstruct, fta)
DEFINE_FIELD_X(SWPlayer, PLAYERstruct, ftq)
DEFINE_FIELD_X(SWPlayer, PLAYERstruct, NumFootPrints)
DEFINE_FIELD_X(SWPlayer, PLAYERstruct, WpnUziType)
DEFINE_FIELD_X(SWPlayer, PLAYERstruct, WpnShotgunType)
DEFINE_FIELD_X(SWPlayer, PLAYERstruct, WpnShotgunAuto)
DEFINE_FIELD_X(SWPlayer, PLAYERstruct, WpnShotgunLastShell)
DEFINE_FIELD_X(SWPlayer, PLAYERstruct, WpnRailType)
DEFINE_FIELD_X(SWPlayer, PLAYERstruct, Bloody)
DEFINE_FIELD_X(SWPlayer, PLAYERstruct, InitingNuke)
DEFINE_FIELD_X(SWPlayer, PLAYERstruct, TestNukeInit)
DEFINE_FIELD_X(SWPlayer, PLAYERstruct, NukeInitialized)
DEFINE_FIELD_X(SWPlayer, PLAYERstruct, FistAng)
DEFINE_FIELD_X(SWPlayer, PLAYERstruct, WpnKungFuMove)
DEFINE_FIELD_X(SWPlayer, PLAYERstruct, HitBy)
DEFINE_FIELD_X(SWPlayer, PLAYERstruct, Reverb)
DEFINE_FIELD_X(SWPlayer, PLAYERstruct, Heads)
DEFINE_FIELD_X(SWPlayer, PLAYERstruct, PlayerVersion)
DEFINE_FIELD_X(SWPlayer, PLAYERstruct, WpnReloadState)
DEFINE_FIELD_X(SWPlayer, PLAYER, sop_remote)
DEFINE_FIELD_X(SWPlayer, PLAYER, jump_count)
DEFINE_FIELD_X(SWPlayer, PLAYER, jump_speed)
DEFINE_FIELD_X(SWPlayer, PLAYER, down_speed)
DEFINE_FIELD_X(SWPlayer, PLAYER, up_speed)
DEFINE_FIELD_X(SWPlayer, PLAYER, z_speed)
DEFINE_FIELD_X(SWPlayer, PLAYER, oz_speed)
DEFINE_FIELD_X(SWPlayer, PLAYER, climb_ndx)
DEFINE_FIELD_X(SWPlayer, PLAYER, hiz)
DEFINE_FIELD_X(SWPlayer, PLAYER, loz)
DEFINE_FIELD_X(SWPlayer, PLAYER, ceiling_dist)
DEFINE_FIELD_X(SWPlayer, PLAYER, floor_dist)
DEFINE_FIELD_X(SWPlayer, PLAYER, circle_camera_dist)
//DEFINE_FIELD_X(SWPlayer, PLAYER, six)
//DEFINE_FIELD_X(SWPlayer, PLAYER, siy)
//DEFINE_FIELD_X(SWPlayer, PLAYER, siz)
DEFINE_FIELD_X(SWPlayer, PLAYER, siang)
//DEFINE_FIELD_X(SWPlayer, PLAYER, xvect)
//DEFINE_FIELD_X(SWPlayer, PLAYER, yvect)
//DEFINE_FIELD_X(SWPlayer, PLAYER, oxvect)
//DEFINE_FIELD_X(SWPlayer, PLAYER, oyvect)
DEFINE_FIELD_X(SWPlayer, PLAYER, friction)
//DEFINE_FIELD_X(SWPlayer, PLAYER, slide_xvect)
//DEFINE_FIELD_X(SWPlayer, PLAYER, slide_yvect)
DEFINE_FIELD_X(SWPlayer, PLAYER, slide_ang)
DEFINE_FIELD_X(SWPlayer, PLAYER, slide_dec)
DEFINE_FIELD_X(SWPlayer, PLAYER, drive_avel)
DEFINE_FIELD_X(SWPlayer, PLAYER, view_outside_dang)
DEFINE_FIELD_X(SWPlayer, PLAYER, circle_camera_ang)
DEFINE_FIELD_X(SWPlayer, PLAYER, camera_check_time_delay)
DEFINE_FIELD_X(SWPlayer, PLAYER, cursector)
DEFINE_FIELD_X(SWPlayer, PLAYER, lastcursector)
DEFINE_FIELD_X(SWPlayer, PLAYER, hvel)
DEFINE_FIELD_X(SWPlayer, PLAYER, tilt)
DEFINE_FIELD_X(SWPlayer, PLAYER, tilt_dest)
DEFINE_FIELD_X(SWPlayer, PLAYER, recoil_amt)
DEFINE_FIELD_X(SWPlayer, PLAYER, recoil_speed)
DEFINE_FIELD_X(SWPlayer, PLAYER, recoil_ndx)
DEFINE_FIELD_X(SWPlayer, PLAYER, recoil_horizoff)
DEFINE_FIELD_X(SWPlayer, PLAYER, recoil_ohorizoff)
//DEFINE_FIELD_X(SWPlayer, PLAYER, oldposx)
//DEFINE_FIELD_X(SWPlayer, PLAYER, oldposy)
//DEFINE_FIELD_X(SWPlayer, PLAYER, oldposz)
//DEFINE_FIELD_X(SWPlayer, PLAYER, Revolve.X)
//DEFINE_FIELD_X(SWPlayer, PLAYER, Revolve.Y)
DEFINE_FIELD_X(SWPlayer, PLAYER, RevolveDeltaAng)
DEFINE_FIELD_X(SWPlayer, PLAYER, pnum)
DEFINE_FIELD_X(SWPlayer, PLAYER, LadderSector)
//DEFINE_FIELD_X(SWPlayer, PLAYER, lx)
//DEFINE_FIELD_X(SWPlayer, PLAYER, ly)
DEFINE_FIELD_X(SWPlayer, PLAYER, JumpDuration)
DEFINE_FIELD_X(SWPlayer, PLAYER, WadeDepth)
DEFINE_FIELD_X(SWPlayer, PLAYER, bob_amt)
DEFINE_FIELD_X(SWPlayer, PLAYER, bob_ndx)
DEFINE_FIELD_X(SWPlayer, PLAYER, bcnt)
DEFINE_FIELD_X(SWPlayer, PLAYER, bob_z)
DEFINE_FIELD_X(SWPlayer, PLAYER, obob_z)
DEFINE_FIELD_X(SWPlayer, PLAYER, playerreadyflag)
DEFINE_FIELD_X(SWPlayer, PLAYER, Flags)
DEFINE_FIELD_X(SWPlayer, PLAYER, Flags2)
DEFINE_FIELD_X(SWPlayer, PLAYER, HasKey)
DEFINE_FIELD_X(SWPlayer, PLAYER, SwordAng)
DEFINE_FIELD_X(SWPlayer, PLAYER, WpnGotOnceFlags)
DEFINE_FIELD_X(SWPlayer, PLAYER, WpnFlags)
DEFINE_FIELD_X(SWPlayer, PLAYER, WpnAmmo)
DEFINE_FIELD_X(SWPlayer, PLAYER, WpnNum)
DEFINE_FIELD_X(SWPlayer, PLAYER, WpnRocketType)
DEFINE_FIELD_X(SWPlayer, PLAYER, WpnRocketHeat)
DEFINE_FIELD_X(SWPlayer, PLAYER, WpnRocketNuke)
DEFINE_FIELD_X(SWPlayer, PLAYER, WpnFlameType)
DEFINE_FIELD_X(SWPlayer, PLAYER, WpnFirstType)
DEFINE_FIELD_X(SWPlayer, PLAYER, WeaponType)
DEFINE_FIELD_X(SWPlayer, PLAYER, FirePause)
DEFINE_FIELD_X(SWPlayer, PLAYER, InventoryNum)
DEFINE_FIELD_X(SWPlayer, PLAYER, InventoryBarTics)
DEFINE_FIELD_X(SWPlayer, PLAYER, InventoryTics)
DEFINE_FIELD_X(SWPlayer, PLAYER, InventoryPercent)
DEFINE_FIELD_X(SWPlayer, PLAYER, InventoryAmount)
DEFINE_FIELD_X(SWPlayer, PLAYER, InventoryActive)
DEFINE_FIELD_X(SWPlayer, PLAYER, DiveTics)
DEFINE_FIELD_X(SWPlayer, PLAYER, DiveDamageTics)
DEFINE_FIELD_X(SWPlayer, PLAYER, DeathType)
DEFINE_FIELD_X(SWPlayer, PLAYER, Kills)
DEFINE_FIELD_X(SWPlayer, PLAYER, SecretsFound)
DEFINE_FIELD_X(SWPlayer, PLAYER, Armor)
DEFINE_FIELD_X(SWPlayer, PLAYER, MaxHealth)
DEFINE_FIELD_X(SWPlayer, PLAYER, UziShellLeftAlt)
DEFINE_FIELD_X(SWPlayer, PLAYER, UziShellRightAlt)
DEFINE_FIELD_X(SWPlayer, PLAYER, TeamColor)
DEFINE_FIELD_X(SWPlayer, PLAYER, FadeTics)
DEFINE_FIELD_X(SWPlayer, PLAYER, FadeAmt)
DEFINE_FIELD_X(SWPlayer, PLAYER, NightVision)
DEFINE_FIELD_X(SWPlayer, PLAYER, StartColor)
DEFINE_FIELD_X(SWPlayer, PLAYER, IsAI)
DEFINE_FIELD_X(SWPlayer, PLAYER, fta)
DEFINE_FIELD_X(SWPlayer, PLAYER, ftq)
DEFINE_FIELD_X(SWPlayer, PLAYER, NumFootPrints)
DEFINE_FIELD_X(SWPlayer, PLAYER, WpnUziType)
DEFINE_FIELD_X(SWPlayer, PLAYER, WpnShotgunType)
DEFINE_FIELD_X(SWPlayer, PLAYER, WpnShotgunAuto)
DEFINE_FIELD_X(SWPlayer, PLAYER, WpnShotgunLastShell)
DEFINE_FIELD_X(SWPlayer, PLAYER, WpnRailType)
DEFINE_FIELD_X(SWPlayer, PLAYER, Bloody)
DEFINE_FIELD_X(SWPlayer, PLAYER, InitingNuke)
DEFINE_FIELD_X(SWPlayer, PLAYER, TestNukeInit)
DEFINE_FIELD_X(SWPlayer, PLAYER, NukeInitialized)
DEFINE_FIELD_X(SWPlayer, PLAYER, FistAng)
DEFINE_FIELD_X(SWPlayer, PLAYER, WpnKungFuMove)
DEFINE_FIELD_X(SWPlayer, PLAYER, HitBy)
DEFINE_FIELD_X(SWPlayer, PLAYER, Reverb)
DEFINE_FIELD_X(SWPlayer, PLAYER, Heads)
DEFINE_FIELD_X(SWPlayer, PLAYER, PlayerVersion)
DEFINE_FIELD_X(SWPlayer, PLAYER, WpnReloadState)
DEFINE_ACTION_FUNCTION(_SWPlayer, WeaponNum)
{
PARAM_SELF_STRUCT_PROLOGUE(PLAYERstruct);
PARAM_SELF_STRUCT_PROLOGUE(PLAYER);
ACTION_RETURN_INT(self->actor->user.WeaponNum);
}
DEFINE_ACTION_FUNCTION(_SWPlayer, Health)
{
PARAM_SELF_STRUCT_PROLOGUE(PLAYERstruct);
PARAM_SELF_STRUCT_PROLOGUE(PLAYER);
ACTION_RETURN_INT(self->actor->user.Health);
}
DEFINE_ACTION_FUNCTION(_SWPlayer, MaxUserHealth)
{
PARAM_SELF_STRUCT_PROLOGUE(PLAYERstruct);
PARAM_SELF_STRUCT_PROLOGUE(PLAYER);
ACTION_RETURN_INT(self->actor->user.MaxHealth);
}
DEFINE_ACTION_FUNCTION(_SWPlayer, GetBuildAngle)
{
PARAM_SELF_STRUCT_PROLOGUE(PLAYERstruct);
PARAM_SELF_STRUCT_PROLOGUE(PLAYER);
ACTION_RETURN_INT(self->angle.ang.asbuild());
}

View file

@ -430,7 +430,7 @@ FSerializer& Serialize(FSerializer& arc, const char* keyname, PLAYERp& w, PLAYER
//
//---------------------------------------------------------------------------
FSerializer& Serialize(FSerializer& arc, const char* keyname, PLAYERstruct& w, PLAYERstruct* def)
FSerializer& Serialize(FSerializer& arc, const char* keyname, PLAYER& w, PLAYER* def)
{
if (arc.BeginObject(keyname))
{