diff --git a/source/games/duke/src/inlines.h b/source/games/duke/src/inlines.h index 6c656d419..59bc1c057 100644 --- a/source/games/duke/src/inlines.h +++ b/source/games/duke/src/inlines.h @@ -136,7 +136,7 @@ inline void PlayerSetInput(int pl, ESyncBits bit) inline int PlayerNewWeapon(int pl) { - return ps[pl].sync.getNewWeapon() - 1; + return ps[pl].sync.getNewWeapon(); } inline void PlayerSetItemUsed(int pl, int num) diff --git a/source/games/duke/src/input.cpp b/source/games/duke/src/input.cpp index 5978efbff..bebcabaec 100644 --- a/source/games/duke/src/input.cpp +++ b/source/games/duke/src/input.cpp @@ -243,8 +243,8 @@ void hud_input(int plnum) } int weap = PlayerNewWeapon(plnum); - if (weap > 0 && p->kickback_pic > 0) - p->wantweaponfire = weap; + if (weap > 1 && p->kickback_pic > 0) + p->wantweaponfire = weap - 1; // Here we have to be extra careful that the weapons do not get mixed up, so let's keep the code for Duke and RR completely separate. fi.selectweapon(plnum, weap); diff --git a/source/games/duke/src/player_d.cpp b/source/games/duke/src/player_d.cpp index 3e2a8c79c..82d7f624d 100644 --- a/source/games/duke/src/player_d.cpp +++ b/source/games/duke/src/player_d.cpp @@ -1299,7 +1299,7 @@ void selectweapon_d(int snum, int weap) // playernum, weaponnum } } } - else j = weap; + else j = weap - 1; k = -1; diff --git a/source/games/duke/src/player_r.cpp b/source/games/duke/src/player_r.cpp index 855c7a706..abfd3daa5 100644 --- a/source/games/duke/src/player_r.cpp +++ b/source/games/duke/src/player_r.cpp @@ -1071,7 +1071,7 @@ void selectweapon_r(int snum, int weap) } } } - else j = weap; + else j = weap - 1; k = -1;