Weapons drawn 1 pixel too high when player is idle #1

Closed
plumsinus opened this Issue Mar 15, 2014 · 2 comments

2 participants

@plumsinus

When the player is stationary, their weapon is drawn 1 pixel higher than when they are moving. You can notice if you tap forward briefly and pay attention to the weapon sprite as you glide to a stop. With some weapons such as the pistol and shotgun, and the screen size at max (i.e. no status bar), there is a 1px gap between the bottom of the screen and the weapon, through which you can see the floor texture or whatever else is there. (This is basically the only reason to report this bug.)

I think the weapon firing sprites are also drawn too high, at least sometimes. I can notice the 1px gap when firing the pistol.

Seems to affect all games, and not depend on the video settings at all.

@plumsinus

To add to the weapon firing: I guess that doom keeps your weapon at whatever bobbing height it was when you start attacking (something I hadn't noticed before!) so if you start firing from stationary, the weapon stays at 1px too high.

@fabiangreffrath

Thank you for the bug report!

It turned out this was caused by a stray "FRACUNIT/2" that got added to the texturemid calculation for player weapon sprite. It didn't make a difference in low resolution mode, but cause the weapon to shift up 1 pixel in high resolution mode. It got fixed already in MBF with the following comment:
// killough 12/98: fix psprite positioning problem

It got fixed in Crispy in commit f3c3c8f.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment