AActor::GiveInventory() is now functional

See https://mantis.zdoom.org/view.php?id=213
This commit is contained in:
alexey.lysiuk 2017-02-09 10:15:05 +02:00
parent ccecfeb45c
commit 4dd7e02721

View file

@ -771,7 +771,7 @@ bool AActor::GiveInventory(PClassActor *type, int amount, bool givecheat)
{
bool result = true;
if (type != nullptr || !type->IsDescendantOf(RUNTIME_CLASS(AInventory))) return false;
if (type == nullptr || !type->IsDescendantOf(RUNTIME_CLASS(AInventory))) return false;
AWeapon *savedPendingWeap = player != NULL ? player->PendingWeapon : NULL;
bool hadweap = player != NULL ? player->ReadyWeapon != NULL : true;