[Pogamut-list] Bot Radius Detection
michal.bida
pogamut-forum at diana.ms.mff.cuni.cz
Fri Nov 26 16:50:52 CET 2010
Re: Bot Radius Detection
Author: michal.bida
Hi!
Currently there is no direct way how to control the bots vision radius. However, it is easy to implement yourself - you need function like this:
{CODE()}
public static final double MAX_DISTANCE = 500;
public boolean canSee(ILocated object) {
if (info.getLocation() != null && info.getLocation().getDistance(object.getLocation()) < MAX_DISTANCE)
return true;
return false;
}
{CODE}
And each time you receive some object in listeners, or you just ask if you can actually see the object with canSee function - if no, you will ignore the object.
But controlling the vision radius might be useful and it will be probably implemented in the future.
Best,
Michal
--
Reply Link: <http://diana.ms.mff.cuni.cz/main/tiki-view_forum_thread.php?forumId=4&comments_reply_threadId=4&comments_parentId=435&post_reply=1#form>
More information about the Pogamut-list
mailing list