- fixed: 'give' inventory functions ignored an items MaxAmount setting.

This commit is contained in:
Christoph Oelckers 2015-11-25 13:36:42 +01:00
parent f4ab6074fa
commit 355f70986a

View file

@ -680,6 +680,7 @@ AInventory *AInventory::CreateCopy (AActor *other)
{ {
AInventory *copy; AInventory *copy;
Amount = MIN(Amount, MaxAmount);
if (GoAway ()) if (GoAway ())
{ {
copy = static_cast<AInventory *>(Spawn (GetClass(), 0, 0, 0, NO_REPLACE)); copy = static_cast<AInventory *>(Spawn (GetClass(), 0, 0, 0, NO_REPLACE));