[Pogamut-list] SafeRunToLocation failing when the sockets are under heavy burden?

yayu pogamut-forum at artemis.ms.mff.cuni.cz
Tue Oct 27 22:41:59 CET 2009


Re: SafeRunToLocation failing when the sockets are under heavy burden?

Author: yayu

Hi, i copy part of the code that is interesting (:wink:)

           item = itemsToRunAround.get(index);
            /**
             * Con el siguiente comentario el bot se mueve de forma no ordenada, cahotica!
             */ 
            res = gameMap.pathManager.retrievePathGB(item.location);
            if ( res == PathResult.PATH_FOUND) {
                path = gameMap.pathManager.getPath();
                log.log(Level.INFO, "Termino todo biiiiiiiiiien.");
                this.body.runToNavPoint(path.get(0));
                this.voyA = path.remove(0);
            }else if (res == PathResult.OBTAINING_PATH){
                log.log(Level.INFO, "Se esta buscando la respuesta. Se consulta nuevamente.");
                res = gameMap.pathManager.retrievePathGB(item.location);
                if ( res == PathResult.PATH_FOUND) {
                    path = gameMap.pathManager.getPath();
                    gameMap.pathManager.restartPathManager();
                    log.log(Level.INFO, "Termino todo biiiiiiiiiien en la segunda vuelta!!.");
                    this.body.runToNavPoint(path.get(0));
                    this.voyA = path.remove(0);
                }
            }else{
                log.log(Level.INFO, "No encontre el path al item.");
                //index = (index + 1) % itemsToRunAround.size();
            }

Sorry for my english,

Matias.





More information about the Pogamut-list mailing list