#ifdef CSQC
#include <client/draw.qh>
-#include <client/resources.qh>
#include <client/view.qh>
+#include <common/resources/cl_resources.qh>
#endif
int entcnt = 0;
FOREACH_ENTITY_CLASS_ORDERED(argv(1), true,
{
- LOG_INFOF("%i (%s)", it, it.classname);
+ LOG_HELPF("%i (%s)", it, it.classname);
++entcnt;
});
if(entcnt)
- LOG_INFOF("Found %d entities", entcnt);
+ LOG_HELPF("Found %d entities", entcnt);
return;
}
{
case CMD_REQUEST_COMMAND:
{
- vector match = stov(argv(1));
- FOREACH_ENTITY_ORDERED(it.origin == match, LOG_INFOF("%i (%s)", it, it.classname));
+ vector org = stov(argv(1));
+ float dist = stof(argv(2));
+ int entcnt = 0;
+ FOREACH_ENTITY_ORDERED(true,
+ {
+ if (dist > 0)
+ {
+ if (!vdist(it.origin - org, <, dist))
+ continue;
+ }
+ else if (it.origin != org)
+ continue;
+ LOG_HELPF("%i (%s)", it, it.classname);
+ ++entcnt;
+ });
+ if(entcnt)
+ LOG_HELPF("Found %d entities", entcnt);
return;
}
LOG_INFOF("Incorrect parameters for ^2%s^7", argv(0));
case CMD_REQUEST_USAGE:
{
- LOG_HELP("Usage:^3 " GetProgramCommandPrefix() " findat <position>");
+ LOG_HELP("Usage:^3 " GetProgramCommandPrefix() " findat <position> [<dist>]");
LOG_HELP(" Where <position> is a vector \"x y z\"");
return;
}