mirror of
https://github.com/ZDoom/raze-gles.git
synced 2025-01-12 11:10:39 +00:00
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:
parent
aba749c3bd
commit
1d75fa13a4
1 changed files with 11 additions and 11 deletions
|
@ -2239,9 +2239,7 @@ void P_DisplayWeapon(void)
|
||||||
RPGGUN + ((*weaponFrame) >> 1), weaponShade, weaponBits, weaponPal);
|
RPGGUN + ((*weaponFrame) >> 1), weaponShade, weaponBits, weaponPal);
|
||||||
else if (WW2GI)
|
else if (WW2GI)
|
||||||
{
|
{
|
||||||
int const totalTime = PWEAPON(screenpeek, pPlayer->curr_weapon, TotalTime);
|
int const totalTime = 8; // not what WW2GI.EXE reports, not in the source, but apparently necessary!
|
||||||
if (*weaponFrame >= 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))
|
||||||
|
@ -2249,7 +2247,6 @@ void P_DisplayWeapon(void)
|
||||||
: 10 * (reloadTime - (*weaponFrame)); // up
|
: 10 * (reloadTime - (*weaponFrame)); // up
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
G_DrawWeaponTileWithID(currentWeapon, weaponX + 164, (weaponY << 1) + 176 - weaponYOffset, RPGGUN, weaponShade,
|
G_DrawWeaponTileWithID(currentWeapon, weaponX + 164, (weaponY << 1) + 176 - weaponYOffset, RPGGUN, weaponShade,
|
||||||
weaponBits, weaponPal);
|
weaponBits, weaponPal);
|
||||||
|
@ -2770,10 +2767,13 @@ void P_DisplayWeapon(void)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// else we are in 'reload time'
|
// else we are in 'reload time'
|
||||||
|
else
|
||||||
|
{
|
||||||
weaponYOffset -= (*weaponFrame < ((reloadTime - totalTime) / 2 + totalTime))
|
weaponYOffset -= (*weaponFrame < ((reloadTime - totalTime) / 2 + totalTime))
|
||||||
? (currentWeapon == GROW_WEAPON ? 5 : 10) * ((*weaponFrame) - totalTime) // D
|
? (currentWeapon == GROW_WEAPON ? 5 : 10) * ((*weaponFrame) - totalTime) // D
|
||||||
: 10 * (reloadTime - (*weaponFrame)); // U
|
: 10 * (reloadTime - (*weaponFrame)); // U
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
G_DrawWeaponTileUnfadedWithID(currentWeapon << 1, weaponX + 184 - halfLookAng, weaponY + 240 - weaponYOffset,
|
G_DrawWeaponTileUnfadedWithID(currentWeapon << 1, weaponX + 184 - halfLookAng, weaponY + 240 - weaponYOffset,
|
||||||
SHRINKER + 3 + ((*weaponFrame) & 3), -32, weaponBits, currentWeapon == GROW_WEAPON ? 2 : 0);
|
SHRINKER + 3 + ((*weaponFrame) & 3), -32, weaponBits, currentWeapon == GROW_WEAPON ? 2 : 0);
|
||||||
|
|
Loading…
Reference in a new issue