From: Mario Date: Sun, 26 Feb 2017 12:47:40 +0000 (+1000) Subject: Show the number of entities found with find command X-Git-Tag: xonotic-v0.8.2~176 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=d7b087c05af6d051246cd128031b1a981a6f4363;p=xonotic%2Fxonotic-data.pk3dir.git Show the number of entities found with find command --- 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; }