WWII GI: Remove the hack/approximation for the bazooka display code because one of the general weapon system fixes made it work incorrectly, and also made a direct port of the original code work correctly. Accuracy FTW!

git-svn-id: https://svn.eduke32.com/eduke32@6873 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
hendricks266 2018-05-03 04:44:33 +00:00
parent 58f5b34143
commit 6688860ef7

View file

@ -2241,12 +2241,13 @@ void P_DisplayWeapon(void)
if (*weaponFrame > 0) if (*weaponFrame > 0)
{ {
if (*weaponFrame < 8) int totalTime;
if (*weaponFrame < (WW2GI ? (totalTime = PWEAPON(screenpeek, pPlayer->curr_weapon, TotalTime)) : 8))
G_DrawWeaponTileWithID(currentWeapon << 1, weaponX + 164, (weaponY << 1) + 176 - weaponYOffset, G_DrawWeaponTileWithID(currentWeapon << 1, weaponX + 164, (weaponY << 1) + 176 - weaponYOffset,
RPGGUN + ((*weaponFrame) >> 1), weaponShade, weaponBits, weaponPal); RPGGUN + ((*weaponFrame) >> 1), weaponShade, weaponBits, weaponPal);
else if (WW2GI) else if (WW2GI)
{ {
int const totalTime = 8; // not what WW2GI.EXE reports, not in the source, but apparently necessary! totalTime = PWEAPON(screenpeek, pPlayer->curr_weapon, TotalTime);
int const reloadTime = PWEAPON(screenpeek, pPlayer->curr_weapon, Reload); int const reloadTime = PWEAPON(screenpeek, pPlayer->curr_weapon, Reload);
weaponYOffset -= (*weaponFrame < ((reloadTime - totalTime) / 2 + totalTime)) weaponYOffset -= (*weaponFrame < ((reloadTime - totalTime) / 2 + totalTime))