Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

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

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

plumsinus opened this issue Mar 15, 2014 · 2 comments

Comments

@plumsinus
Copy link

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
Copy link
Author

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
Copy link
Owner

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
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants