# HG changeset patch # User Adam Kaminski # Date 1629980716 14400 # Thu Aug 26 08:25:16 2021 -0400 # Node ID 911253e84dcf30565d6c148aa6bc072587ec93d5 # Parent 779ba0b5f5fd340d30e9f6e24efd0afff275ff2e Fixed actors hidden by HideOrDestroyIfSafe from being counted in ThingCount and its variants. diff -r 779ba0b5f5fd -r 911253e84dcf src/p_acs.cpp --- a/src/p_acs.cpp Sat Aug 21 23:07:09 2021 -0400 +++ b/src/p_acs.cpp Thu Aug 26 08:25:16 2021 -0400 @@ -3804,7 +3804,9 @@ while ( (actor = iterator.Next ()) ) { if (actor->health > 0 && - (kind == NULL || actor->IsA (kind))) + (kind == NULL || actor->IsA (kind)) && + // [AK] Don't count actors hidden by HideOrDestroyIfSafe(). + ((actor->STFlags & STFL_HIDDEN_INSTEAD_OF_DESTROYED) == false)) { if (actor->Sector->tag == tag || tag == -1) {