From 2ae24e56f28478c4fa9045909acaf323b22e473b Mon Sep 17 00:00:00 2001 From: hendricks266 Date: Wed, 2 May 2018 07:12:49 +0000 Subject: [PATCH] Fix some inaccuracies to the released versions of NAM and WWII GI. *Both: Reload frame display for weapon 1 *WW2GI: Some effect bits for changes in ammo amount of weapon 11 in the status bar Thanks to NY00123 for detailed comparisons of the released source code to the original binaries! git-svn-id: https://svn.eduke32.com/eduke32@6867 1a8010ca-5511-0410-912e-c29ae57300e0 --- source/duke3d/src/player.cpp | 10 +++++----- source/duke3d/src/sbar.cpp | 8 ++++++-- 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/source/duke3d/src/player.cpp b/source/duke3d/src/player.cpp index e5cee351c..f9d373460 100644 --- a/source/duke3d/src/player.cpp +++ b/source/duke3d/src/player.cpp @@ -2508,10 +2508,10 @@ void P_DisplayWeapon(void) if (!(duke3d_globalflags & DUKE3D_NO_WIDESCREEN_PINNING) && DUKE) weaponBits |= 512; - if ((*weaponFrame) < PWEAPON(screenpeek, PISTOL_WEAPON, Reload) - 17) + if ((*weaponFrame) < PWEAPON(screenpeek, PISTOL_WEAPON, Reload) - (NAM_WW2GI ? 40 : 17)) G_DrawWeaponTileWithID(currentWeapon, 194 - (pPlayer->look_ang >> 1), weaponY + 230 - weaponYOffset, FIRSTGUN + 4, weaponShade, weaponBits, weaponPal); - else if ((*weaponFrame) < PWEAPON(screenpeek, PISTOL_WEAPON, Reload) - 12) + else if ((*weaponFrame) < PWEAPON(screenpeek, PISTOL_WEAPON, Reload) - (NAM_WW2GI ? 35 : 12)) { G_DrawWeaponTileWithID(currentWeapon << 1, 244 - ((*weaponFrame) << 3) - (pPlayer->look_ang >> 1), weaponY + 130 - weaponYOffset + ((*weaponFrame) << 4), FIRSTGUN + 6, weaponShade, @@ -2519,7 +2519,7 @@ void P_DisplayWeapon(void) G_DrawWeaponTileWithID(currentWeapon, 224 - (pPlayer->look_ang >> 1), weaponY + 220 - weaponYOffset, FIRSTGUN + 5, weaponShade, weaponBits, weaponPal); } - else if ((*weaponFrame) < PWEAPON(screenpeek, PISTOL_WEAPON, Reload) - 7) + else if ((*weaponFrame) < PWEAPON(screenpeek, PISTOL_WEAPON, Reload) - (NAM_WW2GI ? 30 : 7)) { G_DrawWeaponTileWithID(currentWeapon << 1, 124 + ((*weaponFrame) << 1) - (pPlayer->look_ang >> 1), weaponY + 430 - weaponYOffset - ((*weaponFrame) << 3), FIRSTGUN + 6, weaponShade, @@ -2528,14 +2528,14 @@ void P_DisplayWeapon(void) weaponShade, weaponBits, weaponPal); } - else if ((*weaponFrame) < PWEAPON(screenpeek, PISTOL_WEAPON, Reload) - (WW2GI ? 12 : 4)) + else if ((*weaponFrame) < PWEAPON(screenpeek, PISTOL_WEAPON, Reload) - (NAM_WW2GI ? 12 : 4)) { G_DrawWeaponTileWithID(currentWeapon << 2, 184 - (pPlayer->look_ang >> 1), weaponY + 235 - weaponYOffset, FIRSTGUN + 8, weaponShade, weaponBits, weaponPal); G_DrawWeaponTileWithID(currentWeapon, 224 - (pPlayer->look_ang >> 1), weaponY + 210 - weaponYOffset, FIRSTGUN + 5, weaponShade, weaponBits, weaponPal); } - else if ((*weaponFrame) < PWEAPON(screenpeek, PISTOL_WEAPON, Reload) - (WW2GI ? 6 : 2)) + else if ((*weaponFrame) < PWEAPON(screenpeek, PISTOL_WEAPON, Reload) - (NAM_WW2GI ? 6 : 2)) { G_DrawWeaponTileWithID(currentWeapon << 2, 164 - (pPlayer->look_ang >> 1), weaponY + 245 - weaponYOffset, FIRSTGUN + 8, weaponShade, weaponBits, weaponPal); diff --git a/source/duke3d/src/sbar.cpp b/source/duke3d/src/sbar.cpp index 04efb37c1..d928f6717 100644 --- a/source/duke3d/src/sbar.cpp +++ b/source/duke3d/src/sbar.cpp @@ -841,7 +841,10 @@ void G_DrawStatusBar(int32_t snum) sbar.ammo_amount[i] = p->ammo_amount[i]; if (i < 9) u |= ((2<gotweapon & (1<