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,9 +2239,7 @@ 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 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))
@ -2249,7 +2247,6 @@ void P_DisplayWeapon(void)
: 10 * (reloadTime - (*weaponFrame)); // up
}
}
}
G_DrawWeaponTileWithID(currentWeapon, weaponX + 164, (weaponY << 1) + 176 - weaponYOffset, RPGGUN, weaponShade,
weaponBits, weaponPal);
@ -2770,10 +2767,13 @@ void P_DisplayWeapon(void)
}
}
// else we are in 'reload time'
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,
SHRINKER + 3 + ((*weaponFrame) & 3), -32, weaponBits, currentWeapon == GROW_WEAPON ? 2 : 0);