- Blood: Fix shotgun ammo display when player fires a shell, switches weapons, then switches back.

* Such a circumstance reloads the weapon off screen.
* While the "right" fix would be to stop that, some fanatics will probably be relying on such a mechanism.
* As such, just fudge the printout on the screen instead 🙃.
* Fixes #877.
This commit is contained in:
Mitchell Richters 2023-03-15 21:30:44 +11:00
parent e8f2f98473
commit 30f9ec5fd8

View file

@ -688,6 +688,9 @@ class BloodStatusBar : RazeStatusBar
}
else
{
bool stateNeedsEvenAmt = pPlayer.weaponState == 3 || pPlayer.weaponState == 1;
bool stateNeedsOddAmt = pPlayer.weaponState == 2;
num += stateNeedsEvenAmt && (num % 2) || stateNeedsOddAmt && !(num % 2);
int clip = CalcMagazineAmount(num, 2, pPlayer.weaponState == 1);
int total = num - clip;
String format = String.Format("%d/%d", clip, num - clip);