[Pogamut-list] update analyzer faster

bulent pogamut-forum at diana.ms.mff.cuni.cz
Thu Nov 4 19:13:27 CET 2010


Re: update analyzer faster

Author: bulent

Here's the code to test the vision time. The counter only goes upto 4.

{CODE()}
int counter = 1;
long prevTime = System.currentTimeMillis();

public void prepareBot(UT2004Bot bot) {
   getAct().act(new Configuration().setVisionTime(0.1d));
}

public void logic() throws PogamutException {
   long currentTime = System.currentTimeMillis();
   if(currentTime - prevTime > 1000){
      prevTime+=1000;
      counter = 1;
   }
   else counter++;
   System.out.println(counter);
}
{CODE}

-- 
Reply Link: <http://diana.ms.mff.cuni.cz/main/tiki-view_forum_thread.php?forumId=4&comments_reply_threadId=4&comments_parentId=386&post_reply=1#form>





More information about the Pogamut-list mailing list