From 6688860ef79b23404b9683650caa8bc8310671d2 Mon Sep 17 00:00:00 2001 From: hendricks266 Date: Thu, 3 May 2018 04:44:33 +0000 Subject: [PATCH] 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 --- source/duke3d/src/player.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/source/duke3d/src/player.cpp b/source/duke3d/src/player.cpp index 0eede9de1..57b79b81f 100644 --- a/source/duke3d/src/player.cpp +++ b/source/duke3d/src/player.cpp @@ -2241,12 +2241,13 @@ void P_DisplayWeapon(void) 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, RPGGUN + ((*weaponFrame) >> 1), weaponShade, weaponBits, weaponPal); 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); weaponYOffset -= (*weaponFrame < ((reloadTime - totalTime) / 2 + totalTime))