From 7cd1780004fd57f9a078eeff50dd7762c9454970 Mon Sep 17 00:00:00 2001 From: Mitchell Richters Date: Tue, 3 Oct 2023 19:05:14 +1100 Subject: [PATCH] - Duke: Remove `PlayerNewWeapon()` wrapper. --- source/games/duke/src/inlines.h | 6 ------ source/games/duke/src/input.cpp | 2 +- 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/source/games/duke/src/inlines.h b/source/games/duke/src/inlines.h index e33618567..669930683 100644 --- a/source/games/duke/src/inlines.h +++ b/source/games/duke/src/inlines.h @@ -121,12 +121,6 @@ inline void PlayerSetInput(int pl, ESyncBits bit) getPlayer(pl)->cmd.ucmd.actions |= bit; } - -inline int PlayerNewWeapon(int pl) -{ - return getPlayer(pl)->cmd.ucmd.getNewWeapon(); -} - inline void PlayerSetItemUsed(int pl, int num) { getPlayer(pl)->cmd.ucmd.setItemUsed(num - 1); diff --git a/source/games/duke/src/input.cpp b/source/games/duke/src/input.cpp index 09ae81e8c..de433d33c 100644 --- a/source/games/duke/src/input.cpp +++ b/source/games/duke/src/input.cpp @@ -243,7 +243,7 @@ void hud_input(int plnum) if (dainv >= 1 && dainv < 8) FTA(invquotes[dainv - 1], p); } - int weap = PlayerNewWeapon(plnum); + int weap = p->cmd.ucmd.getNewWeapon(); if (weap > 1 && p->kickback_pic > 0) p->wantweaponfire = weap - 1;