@@ -1291,10 +1291,6 @@ static void R_DrawPlayerSprite(const pspdef_t *psp, bool invisibility, bool alte
12911291
12921292 // store information in a vissprite
12931293 vis -> texturemid = (BASEYCENTER << FRACBITS ) + FRACUNIT / 4 - (psp -> sy + ABS (viewplayer -> bounce ) - spritetopoffset [lump ]);
1294-
1295- vis -> x1 = MAX (0 , x1 );
1296- vis -> x2 = MIN (x2 , viewwidth - 1 );
1297- vis -> startfrac = (vis -> x1 > x1 ? pspriteiscale * (vis -> x1 - x1 ) : 0 );
12981294 vis -> patch = lump ;
12991295
13001296 // interpolation for weapon bobbing
@@ -1324,10 +1320,9 @@ static void R_DrawPlayerSprite(const pspdef_t *psp, bool invisibility, bool alte
13241320 {
13251321 const int basex1 = psp_inter .x1 ;
13261322 int interpx1 = basex1 + FixedMul (x1 - basex1 , fractionaltic );
1327- int interpx2 = interpx1 + x2 - basex1 ;
13281323
13291324 vis -> x1 = MAX (0 , interpx1 );
1330- vis -> x2 = MIN (interpx2 , viewwidth - 1 );
1325+ vis -> x2 = MIN (interpx1 + x2 - basex1 , viewwidth - 1 );
13311326 vis -> startfrac = (vis -> x1 > interpx1 ? pspriteiscale * (vis -> x1 - interpx1 ) : 0 );
13321327 vis -> texturemid = psp_inter .texturemid + FixedMul (vis -> texturemid - psp_inter .texturemid ,
13331328 fractionaltic );
@@ -1339,8 +1334,18 @@ static void R_DrawPlayerSprite(const pspdef_t *psp, bool invisibility, bool alte
13391334 psp_inter .lump = lump ;
13401335
13411336 skippsprinterp = false;
1337+
1338+ vis -> x1 = MAX (0 , x1 );
1339+ vis -> x2 = MIN (x2 , viewwidth - 1 );
1340+ vis -> startfrac = (vis -> x1 > x1 ? pspriteiscale * (vis -> x1 - x1 ) : 0 );
13421341 }
13431342 }
1343+ else
1344+ {
1345+ vis -> x1 = MAX (0 , x1 );
1346+ vis -> x2 = MIN (x2 , viewwidth - 1 );
1347+ vis -> startfrac = (vis -> x1 > x1 ? pspriteiscale * (vis -> x1 - x1 ) : 0 );
1348+ }
13441349
13451350 vis -> texturemid += FixedMul (((centery - viewheight / 2 ) << FRACBITS ), pspriteiscale );
13461351
0 commit comments