From 476b727d5d99afccaf7a73935379816734500157 Mon Sep 17 00:00:00 2001 From: raa-eruanna Date: Fri, 16 Sep 2016 00:47:56 -0400 Subject: [PATCH] "actorlist" and "actornum" no longer return already-owned inventory objects --- src/c_cmds.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/c_cmds.cpp b/src/c_cmds.cpp index fa01e1b4b..03a7495e4 100644 --- a/src/c_cmds.cpp +++ b/src/c_cmds.cpp @@ -926,7 +926,10 @@ static bool IsActorACountItem(AActor *mo) // [SP] for all actors static bool IsActor(AActor *mo) { - return true; + if (mo->IsKindOf(RUNTIME_CLASS(AInventory))) + return static_cast(mo)->Owner == NULL; // [SP] Exclude inventory-owned items + else + return true; } // [SP] modified - now allows showing count only, new arg must be passed. Also now still counts regardless, if lists are printed.