From d7b087c05af6d051246cd128031b1a981a6f4363 Mon Sep 17 00:00:00 2001 From: Mario Date: Sun, 26 Feb 2017 22:47:40 +1000 Subject: [PATCH] Show the number of entities found with find command --- qcsrc/common/debug.qh | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/qcsrc/common/debug.qh b/qcsrc/common/debug.qh index 10a69a706..8bdbcf705 100644 --- a/qcsrc/common/debug.qh +++ b/qcsrc/common/debug.qh @@ -319,7 +319,14 @@ GENERIC_COMMAND(find, "Search through entities for matching classname") { case CMD_REQUEST_COMMAND: { - FOREACH_ENTITY_CLASS_ORDERED(argv(1), true, LOG_INFOF("%i (%s)\n", it, it.classname)); + int entcnt = 0; + FOREACH_ENTITY_CLASS_ORDERED(argv(1), true, + { + LOG_INFOF("%i (%s)\n", it, it.classname); + ++entcnt; + }); + if(entcnt) + LOG_INFOF("Found %i entities\n", entcnt); return; } -- 2.39.2