Skip to content

Commit 1217ea4

Browse files
committed
Minor tweaks
1 parent 5e32547 commit 1217ea4

File tree

3 files changed

+13
-7
lines changed

3 files changed

+13
-7
lines changed

releasenotes.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@
5151
* Changing the `con_warninglevel` CVAR will now cause all previously generated warnings in the console to appear or disappear accordingly.
5252
* Wildcard expressions now work correctly with the `reset` CCMD to reset multiple CVARs at once.
5353
* The `BIGDOOR1` texture is now vertically aligned correctly.
54+
* A bug is fixed whereby the player’s weapon could bleed from the right side of the screen to the left in some rare instances.
5455

5556
![](https://github.com/bradharding/www.doomretro.com/raw/master/wiki/bigdivider.png)
5657

src/p_setup.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -383,7 +383,7 @@ int nograduallighting_global = -1;
383383
bool canmodify;
384384
bool transferredsky;
385385

386-
static int MAPINFO;
386+
static int MAPINFO = -1;
387387
char *mapinfolump = "";
388388

389389
bool samelevel;

src/r_things.c

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -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

Comments
 (0)