- Null the roll angle used for weapon drawing when looking left/right and with Blood's delirium for now.

* Intended to make the look left/right keys better, but doesn't work properly for weapons made up of layered parts of varying sizes.
* Fixes #879.
This commit is contained in:
Mitchell Richters 2023-03-16 16:34:31 +11:00
parent 528eb0ea9a
commit 8bcbc1b892
2 changed files with 5 additions and 2 deletions

View file

@ -65,8 +65,8 @@ struct PlayerAngles
}
auto getWeaponOffsets(const double interpfrac)
{
// Push the Y down a bit since the weapon is at the edge of the screen.
auto offsets = getCrosshairOffsets(interpfrac); offsets.first.Y *= 4.;
// Push the Y down a bit since the weapon is at the edge of the screen. Also null roll for now.
auto offsets = getCrosshairOffsets(interpfrac); offsets.first.Y *= 4.; offsets.second = nullAngle;
return offsets;
}

View file

@ -112,6 +112,9 @@ void hudDraw(PLAYER* pPlayer, sectortype* pSector, double bobx, double boby, dou
{
if (gViewPos == 0)
{
// Nullify incoming roll angle for now as it doesn't draw weapons made up of parts correctly.
angle = nullAngle;
auto cXY = DVector2(160, 220) + pPlayer->Angles.getWeaponOffsets(interpfrac).first;
if (cl_weaponsway)