- removed unused fields from PLAYER.

This commit is contained in:
Christoph Oelckers 2022-09-01 18:47:23 +02:00
parent 1300e76428
commit cebdc653bb
4 changed files with 2 additions and 34 deletions

View file

@ -625,9 +625,9 @@ struct PLAYER
DVector3 si; // save player interp position for PlayerSprite
DAngle siang;
vec2_t vect, ovect, slide_vect;
vec2_t vect, ovect, slide_vect; // these need floatification, but must be done together.
int friction;
int16_t slide_ang;
int16_t slide_ang; // todo: floatify
int slide_dec;
float drive_avel;
@ -644,7 +644,6 @@ struct PLAYER
bool insector() const { return cursector != nullptr; }
// variables that do not fit into sprite structure
int hvel,tilt,tilt_dest;
PlayerHorizon horizon;
PlayerAngle angle;
int16_t recoil_amt;

View file

@ -5363,8 +5363,6 @@ void DoPlayerBeginDie(PLAYER* pp)
pp->Flags &= ~(PF_JUMPING|PF_FALLING|PF_DIVING|PF_FLYING|PF_CLIMBING|PF_CRAWLING|PF_LOCK_CRAWL);
pp->tilt_dest = 0;
ActorCoughItem(pp->actor);
if (numplayers > 1)
@ -5542,26 +5540,6 @@ void DoPlayerDeathHoriz(PLAYER* pp, short target, short speed)
}
}
int DoPlayerDeathTilt(PLAYER* pp, short target, short speed)
{
if (pp->tilt > target)
{
pp->tilt -= speed;
if (pp->tilt <= target)
pp->tilt = target;
}
if (pp->tilt < target)
{
pp->tilt += speed;
if (pp->tilt >= target)
pp->tilt = target;
}
return pp->tilt == target;
}
void DoPlayerDeathZrange(PLAYER* pp)
{
DSWActor* plActor = pp->actor;
@ -5608,7 +5586,6 @@ void DoPlayerDeathFollowKiller(PLAYER* pp)
// if it didn't make it to this angle because of a low ceiling or something
// continue on to it
DoPlayerDeathHoriz(pp, PLAYER_DEATH_HORIZ_UP_VALUE, 4);
//DoPlayerDeathTilt(pp, pp->tilt_dest, 4 * synctics);
// allow turning
if (pp->Flags & (PF_DEAD_HEAD|PF_HEAD_CONTROL))
@ -5683,7 +5660,6 @@ void DoPlayerDeathCheckKeys(PLAYER* pp)
plActor->spr.xrepeat = PLAYER_NINJA_XREPEAT;
plActor->spr.yrepeat = PLAYER_NINJA_YREPEAT;
//pp->tilt = 0;
pp->horizon.horiz = q16horiz(0);
DoPlayerResetMovement(pp);
plActor->user.ID = NINJA_RUN_R0;
@ -7003,9 +6979,6 @@ 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)

View file

@ -477,9 +477,6 @@ FSerializer& Serialize(FSerializer& arc, const char* keyname, PLAYER& w, PLAYER*
("camera_check_time_delay", w.camera_check_time_delay)
("cursectnum", w.cursector)
("lastcursectnum", w.lastcursector)
("hvel", w.hvel)
("tilt", w.tilt)
("tilt_dest", w.tilt_dest)
("horizon", w.horizon)
("angle", w.angle)
("recoil_amt", w.recoil_amt)

View file

@ -206,7 +206,6 @@ struct SWPlayer native
//native int /*cursectnum,*/lastcursectnum;
// variables that do not fit into sprite structure
native int hvel,tilt,tilt_dest;
native int16 recoil_amt;
native int16 recoil_speed;
native int16 recoil_ndx;