mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2025-01-18 14:41:40 +00:00
- The "give artifacts" and "give puzzlepieces" commands now ignore items that have been replaced.
"give everything" continues to give replaced items, however. SVN r3411 (trunk)
This commit is contained in:
parent
fdec9bdee3
commit
8f8f937f9b
1 changed files with 10 additions and 2 deletions
|
@ -768,7 +768,11 @@ void cht_Give (player_t *player, const char *name, int amount)
|
|||
!type->IsDescendantOf (RUNTIME_CLASS(APowerup)) &&
|
||||
!type->IsDescendantOf (RUNTIME_CLASS(AArmor)))
|
||||
{
|
||||
GiveSpawner (player, type, amount <= 0 ? def->MaxAmount : amount);
|
||||
// Do not give replaced items unless using "give everything"
|
||||
if (giveall == ALL_YESYES || type->GetReplacement() == type)
|
||||
{
|
||||
GiveSpawner (player, type, amount <= 0 ? def->MaxAmount : amount);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -786,7 +790,11 @@ void cht_Give (player_t *player, const char *name, int amount)
|
|||
AInventory *def = (AInventory*)GetDefaultByType (type);
|
||||
if (def->Icon.isValid())
|
||||
{
|
||||
GiveSpawner (player, type, amount <= 0 ? def->MaxAmount : amount);
|
||||
// Do not give replaced items unless using "give everything"
|
||||
if (giveall == ALL_YESYES || type->GetReplacement() == type)
|
||||
{
|
||||
GiveSpawner (player, type, amount <= 0 ? def->MaxAmount : amount);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue