From 319671b54aca93575747c2da34f8cf608f2e1f04 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Tue, 28 Apr 2015 22:05:43 +0200 Subject: [PATCH] - let cheats only give weapons in weapon slots. This avoids problems which replace the entire arsenal and don't want the original weapons in there. --- src/m_cheat.cpp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/m_cheat.cpp b/src/m_cheat.cpp index f60131c8e..de2c6dc82 100644 --- a/src/m_cheat.cpp +++ b/src/m_cheat.cpp @@ -768,11 +768,8 @@ void cht_Give (player_t *player, const char *name, int amount) type->GetReplacement()->IsDescendantOf(RUNTIME_CLASS(ADehackedPickup)))) { - // Give the weapon only if it belongs to the current game or - // is in a weapon slot. - if (type->ActorInfo->GameFilter == GAME_Any || - (type->ActorInfo->GameFilter & gameinfo.gametype) || - player->weapons.LocateWeapon(type, NULL, NULL)) + // Give the weapon only if it is in a weapon slot. + if (player->weapons.LocateWeapon(type, NULL, NULL)) { AWeapon *def = (AWeapon*)GetDefaultByType (type); if (giveall == ALL_YESYES || !(def->WeaponFlags & WIF_CHEATNOTWEAPON))