mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-22 20:21:26 +00:00
- 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.
This commit is contained in:
parent
a93c30238b
commit
319671b54a
1 changed files with 2 additions and 5 deletions
|
@ -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))
|
||||
|
|
Loading…
Reference in a new issue