Fix an error introduced in cleanup of the WWII GI Devastator weapon reload animation, as pointed out by Xcode.

Also perform similar cleanup on a similar line elsewhere.

git-svn-id: https://svn.eduke32.com/eduke32@5959 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
hendricks266 2016-12-26 06:01:57 +00:00
parent d6ace49d54
commit a31ad532dd

View file

@ -2626,9 +2626,9 @@ void P_DisplayWeapon(void)
// else we are in 'reload time' // else we are in 'reload time'
else else
{ {
weaponYOffset -= 10 * (*weaponFrame < ((reloadTime - totalTime) / 2 + totalTime)) weaponYOffset -= (*weaponFrame < ((reloadTime - totalTime) / 2 + totalTime))
? ((*weaponFrame) - totalTime) ? 10 * ((*weaponFrame) - totalTime)
: (reloadTime - (*weaponFrame)); : 10 * (reloadTime - (*weaponFrame));
G_DrawWeaponTileWithID(currentWeapon, weaponX + 268 - halfLookAng, weaponY + 238 - weaponYOffset, DEVISTATOR, G_DrawWeaponTileWithID(currentWeapon, weaponX + 268 - halfLookAng, weaponY + 238 - weaponYOffset, DEVISTATOR,
weaponShade, weaponBits, weaponPal, 0); weaponShade, weaponBits, weaponPal, 0);
@ -2755,10 +2755,9 @@ void P_DisplayWeapon(void)
} }
} }
// else we are in 'reload time' // else we are in 'reload time'
else if (*weaponFrame < ((reloadTime - totalTime) / 2 + totalTime)) weaponYOffset -= (*weaponFrame < ((reloadTime - totalTime) / 2 + totalTime))
weaponYOffset -= (currentWeapon == GROW_WEAPON ? 5 : 10) * ((*weaponFrame) - totalTime); // D ? (currentWeapon == GROW_WEAPON ? 5 : 10) * ((*weaponFrame) - totalTime) // D
else : 10 * (reloadTime - (*weaponFrame)); // U
weaponYOffset -= 10 * (reloadTime - (*weaponFrame)); // U
} }
G_DrawWeaponTileWithID(currentWeapon << 1, weaponX + 184 - halfLookAng, weaponY + 240 - weaponYOffset, G_DrawWeaponTileWithID(currentWeapon << 1, weaponX + 184 - halfLookAng, weaponY + 240 - weaponYOffset,