From 68668058c9faebf0e5c51287c746fc6b894ed971 Mon Sep 17 00:00:00 2001 From: hendricks266 Date: Sat, 30 Nov 2019 06:10:58 +0000 Subject: [PATCH] SW: Fix cheats only granting one Uzi instead of two git-svn-id: https://svn.eduke32.com/eduke32@8343 1a8010ca-5511-0410-912e-c29ae57300e0 --- source/sw/src/cheats.cpp | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/source/sw/src/cheats.cpp b/source/sw/src/cheats.cpp index 8c7ce438b..e44e2ff0b 100644 --- a/source/sw/src/cheats.cpp +++ b/source/sw/src/cheats.cpp @@ -167,6 +167,12 @@ void WeaponCheat(PLAYERp pp, const char *) p = &Player[pnum]; u = User[p->PlayerSprite]; + if (!TEST(p->Flags, PF_TWO_UZI)) + { + SET(p->Flags, PF_TWO_UZI); + SET(p->Flags, PF_PICKED_UP_AN_UZI); + } + // ALL WEAPONS if (!SW_SHAREWARE) p->WpnFlags = 0xFFFFFFFF; @@ -248,13 +254,6 @@ void ItemCheat(PLAYERp pp, const char *cheat_string) p = &Player[pnum]; memset(p->HasKey, TRUE, sizeof(p->HasKey)); - if (p->Wpn[WPN_UZI] && p->CurWpn == p->Wpn[WPN_UZI]) - { - SET(p->Flags, PF_TWO_UZI); - SET(p->Flags, PF_PICKED_UP_AN_UZI); - InitWeaponUzi(p); - } - p->WpnShotgunAuto = 50; p->WpnRocketHeat = 5; p->WpnRocketNuke = 1;