{
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));
+ if (dist > 0)
+ FOREACH_ENTITY_ORDERED(vdist(it.origin - org, <, dist), LOG_HELPF("%i (%s)", it, it.classname));
+ else
+ FOREACH_ENTITY_ORDERED(it.origin == org, LOG_HELPF("%i (%s)", it, it.classname));
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;
}