From 4dd7e02721d60f0184e7cb57bb5901caaa9f9948 Mon Sep 17 00:00:00 2001 From: "alexey.lysiuk" Date: Thu, 9 Feb 2017 10:15:05 +0200 Subject: [PATCH] AActor::GiveInventory() is now functional See https://mantis.zdoom.org/view.php?id=213 --- src/p_mobj.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/p_mobj.cpp b/src/p_mobj.cpp index 2650224be..53491f235 100644 --- a/src/p_mobj.cpp +++ b/src/p_mobj.cpp @@ -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;