Skip to content

Commit

Permalink
rfomin's patch: remove pspr_interp
Browse files Browse the repository at this point in the history
Co-Authored-By: Roman Fomin <[email protected]>
  • Loading branch information
MrAlaux and rfomin committed Jan 6, 2025
1 parent d2eefd8 commit 43de780
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 13 deletions.
3 changes: 0 additions & 3 deletions src/am_map.c
Original file line number Diff line number Diff line change
Expand Up @@ -2312,10 +2312,7 @@ void AM_Drawer (void)
}

if (automapoverlay == AM_OVERLAY_OFF)
{
AM_clearFB(mapcolor_back); //jff 1/5/98 background default color
pspr_interp = false;
}
// [Alaux] Dark automap overlay
else if (automapoverlay == AM_OVERLAY_DARK && !MN_MenuIsShaded())
V_ShadeScreen();
Expand Down
2 changes: 0 additions & 2 deletions src/p_mobj.c
Original file line number Diff line number Diff line change
Expand Up @@ -1127,8 +1127,6 @@ void P_SpawnPlayer (mapthing_t* mthing)

p->momx = p->momy = 0; // killough 10/98: initialize bobbing to 0.

pspr_interp = false;

// setup gun psprite

P_SetupPsprites (p);
Expand Down
7 changes: 5 additions & 2 deletions src/p_pspr.c
Original file line number Diff line number Diff line change
Expand Up @@ -167,9 +167,12 @@ static void P_BringUpWeapon(player_t *player)

player->pendingweapon = wp_nochange;

pspdef_t *psp = &player->psprites[ps_weapon];

// killough 12/98: prevent pistol from starting visibly at bottom of screen:
player->psprites[ps_weapon].sy = demo_version >= DV_MBF ?
WEAPONBOTTOM+FRACUNIT*2 : WEAPONBOTTOM;
psp->sy = demo_version >= DV_MBF ? WEAPONBOTTOM + FRACUNIT * 2 : WEAPONBOTTOM;

psp->sy2 = psp->oldsy2 = psp->sy;

P_SetPsprite(player, ps_weapon, newstate);
}
Expand Down
6 changes: 1 addition & 5 deletions src/r_things.c
Original file line number Diff line number Diff line change
Expand Up @@ -787,8 +787,6 @@ void R_NearbySprites (void)
// R_DrawPSprite
//

boolean pspr_interp = true; // weapon bobbing interpolation

void R_DrawPSprite (pspdef_t *psp)
{
fixed_t tx;
Expand Down Expand Up @@ -823,15 +821,13 @@ void R_DrawPSprite (pspdef_t *psp)

fixed_t sx2, sy2;

if (uncapped && oldleveltime < leveltime && pspr_interp)
if (uncapped && oldleveltime < leveltime)
{
sx2 = LerpFixed(psp->oldsx2, psp->sx2);
sy2 = LerpFixed(psp->oldsy2, psp->sy2);
}
else
{
pspr_interp = true;

sx2 = psp->sx2;
sy2 = psp->sy2;
}
Expand Down
1 change: 0 additions & 1 deletion src/r_things.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ extern int64_t sprtopscreen; // [FG] 64-bit integer math
extern fixed_t pspritescale;
extern fixed_t pspriteiscale;

extern boolean pspr_interp; // weapon bobbing interpolation
extern boolean flipcorpses;

extern lighttable_t **spritelights;
Expand Down

0 comments on commit 43de780

Please sign in to comment.