mirror of
https://github.com/ZDoom/qzdoom-gpl.git
synced 2025-01-31 10:40:33 +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(APowerup)) &&
|
||||||
!type->IsDescendantOf (RUNTIME_CLASS(AArmor)))
|
!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);
|
AInventory *def = (AInventory*)GetDefaultByType (type);
|
||||||
if (def->Icon.isValid())
|
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