WWII GI: Fix mistakes in our version of the weapon display code.

git-svn-id: https://svn.eduke32.com/eduke32@6869 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
hendricks266 2018-05-02 07:12:55 +00:00
parent aba749c3bd
commit 1d75fa13a4

View file

@ -2239,15 +2239,12 @@ void P_DisplayWeapon(void)
RPGGUN + ((*weaponFrame) >> 1), weaponShade, weaponBits, weaponPal);
else if (WW2GI)
{
int const totalTime = PWEAPON(screenpeek, pPlayer->curr_weapon, TotalTime);
if (*weaponFrame >= totalTime)
{
int const reloadTime = PWEAPON(screenpeek, pPlayer->curr_weapon, Reload);
int const totalTime = 8; // not what WW2GI.EXE reports, not in the source, but apparently necessary!
int const reloadTime = PWEAPON(screenpeek, pPlayer->curr_weapon, Reload);
weaponYOffset -= (*weaponFrame < ((reloadTime - totalTime) / 2 + totalTime))
? 10 * ((*weaponFrame) - totalTime) // down
: 10 * (reloadTime - (*weaponFrame)); // up
}
weaponYOffset -= (*weaponFrame < ((reloadTime - totalTime) / 2 + totalTime))
? 10 * ((*weaponFrame) - totalTime) // down
: 10 * (reloadTime - (*weaponFrame)); // up
}
}
@ -2770,9 +2767,12 @@ void P_DisplayWeapon(void)
}
}
// else we are in 'reload time'
weaponYOffset -= (*weaponFrame < ((reloadTime - totalTime) / 2 + totalTime))
? (currentWeapon == GROW_WEAPON ? 5 : 10) * ((*weaponFrame) - totalTime) // D
: 10 * (reloadTime - (*weaponFrame)); // U
else
{
weaponYOffset -= (*weaponFrame < ((reloadTime - totalTime) / 2 + totalTime))
? (currentWeapon == GROW_WEAPON ? 5 : 10) * ((*weaponFrame) - totalTime) // D
: 10 * (reloadTime - (*weaponFrame)); // U
}
}
G_DrawWeaponTileUnfadedWithID(currentWeapon << 1, weaponX + 184 - halfLookAng, weaponY + 240 - weaponYOffset,