diff --git a/source/games/duke/src/gamevar.cpp b/source/games/duke/src/gamevar.cpp index 892426866..5f2b56b95 100644 --- a/source/games/duke/src/gamevar.cpp +++ b/source/games/duke/src/gamevar.cpp @@ -549,6 +549,8 @@ void InitGameVarPointers(void) char aszBuf[64]; // called from game Init AND when level is loaded... + if (!isWW2GI()) return; + for (i = 0; i < 12/*MAX_WEAPONS*/; i++) // Setup only exists for the original 12 weapons. { sprintf(aszBuf, "WEAPON%d_CLIP", i); diff --git a/source/games/duke/src/hudweapon_d.cpp b/source/games/duke/src/hudweapon_d.cpp index 7a58c1246..b49b45f86 100644 --- a/source/games/duke/src/hudweapon_d.cpp +++ b/source/games/duke/src/hudweapon_d.cpp @@ -282,9 +282,13 @@ void displayweapon_d(int snum, double interpfrac) } else { - auto weapTotalTime = aplWeaponTotalTime(p->curr_weapon, snum); - auto weapFireDelay = aplWeaponFireDelay(p->curr_weapon, snum); - auto weapReload = aplWeaponReload(p->curr_weapon, snum); + int weapTotalTime = 0, weapFireDelay = 0, weapReload = 0; + if (isWW2GI()) + { + weapTotalTime = aplWeaponTotalTime(p->curr_weapon, snum); + weapFireDelay = aplWeaponFireDelay(p->curr_weapon, snum); + weapReload = aplWeaponReload(p->curr_weapon, snum); + } //--------------------------------------------------------------------------- // @@ -737,7 +741,6 @@ void displayweapon_d(int snum, double interpfrac) { // down offsets.Y += 10 * (kickback_pic - weapTotalTime); //D - // offsets.X += 80 * (*kb - aplWeaponTotalTime[cw][snum]); hud_drawpal(268 + offsets.X, 238 + offsets.Y, DTILE_DEVISTATOR, shade, o, pal, angle); hud_drawpal(30 + offsets.X, 240 + offsets.Y, DTILE_DEVISTATOR, shade, o | 4, pal, angle); } @@ -745,7 +748,6 @@ void displayweapon_d(int snum, double interpfrac) { // up and left offsets.Y += 10 * (weapReload - kickback_pic); //U - // offsets.X += 80 * (*kb - aplWeaponTotalTime[cw][snum]); hud_drawpal(268 + offsets.X, 238 + offsets.Y, DTILE_DEVISTATOR, shade, o, pal, angle); hud_drawpal(30 + offsets.X, 240 + offsets.Y, DTILE_DEVISTATOR, shade, o | 4, pal, angle); } diff --git a/source/games/duke/src/player_d.cpp b/source/games/duke/src/player_d.cpp index 514d7dbda..c5939e7fb 100644 --- a/source/games/duke/src/player_d.cpp +++ b/source/games/duke/src/player_d.cpp @@ -1344,28 +1344,22 @@ static void operateweapon(int snum, ESyncBits actions) p->ammo_amount[p->curr_weapon]--; shoot(pact, DukeGrowSparkClass); - //#ifdef NAM - //#else - if (!(aplWeaponFlags(p->curr_weapon, snum) & WEAPON_FLAG_NOVISIBLE)) + if (!isNam()) { // make them visible if not set... p->visibility = 0; lastvisinc = PlayClock + 32; + checkavailweapon(p); } - checkavailweapon(p); - //#endif } else if (!isNam()) p->kickback_pic++; if (isNam() && p->kickback_pic > 30) { // reload now... p->okickback_pic = p->kickback_pic = 0; - if (!(aplWeaponFlags(p->curr_weapon, snum) & WEAPON_FLAG_NOVISIBLE)) - { - // make them visible if not set... - p->visibility = 0; - lastvisinc = PlayClock + 32; - } + // make them visible if not set... + p->visibility = 0; + lastvisinc = PlayClock + 32; checkavailweapon(p); } break;