From: Daniel H. <wik...@us...> - 2006-08-23 02:07:26
|
Update of /cvsroot/arianne/stendhal/src/games/stendhal/server/pathfinder In directory sc8-pr-cvs11.sourceforge.net:/tmp/cvs-serv25623/src/games/stendhal/server/pathfinder Modified Files: Path.java Log Message: made use of the fact that StendhalRPWorld is a Singleton Index: Path.java =================================================================== RCS file: /cvsroot/arianne/stendhal/src/games/stendhal/server/pathfinder/Path.java,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** Path.java 22 Aug 2006 02:01:17 -0000 1.14 --- Path.java 23 Aug 2006 02:07:22 -0000 1.15 *************** *** 25,29 **** import marauroa.common.Log4J; - import marauroa.server.game.RPWorld; import org.apache.log4j.Logger; --- 25,28 ---- *************** *** 33,38 **** private static final Logger logger = Log4J.getLogger(Path.class); - private static StendhalRPWorld world; - private static StepCallback callback; --- 32,35 ---- *************** *** 59,66 **** } - public static void initialize(RPWorld world) { - Path.world = (StendhalRPWorld) world; - } - /** * Sets the step-callback. This will be called after each step. <b>Note: --- 56,59 ---- *************** *** 92,97 **** } } ! ! world.modify(entity); } --- 85,89 ---- } } ! entity.notifyWorldAboutChanges(); } *************** *** 220,226 **** */ public static void searchPathAsynchonous(RPEntity entity, Entity dest) { ! world.checkPathfinder(); ! boolean result = world.getPathfinder().queuePath( new QueuedPath(new SimplePathListener(entity), entity, entity .getx(), entity.gety(), dest.getArea(dest.getx(), dest --- 212,218 ---- */ public static void searchPathAsynchonous(RPEntity entity, Entity dest) { ! StendhalRPWorld.get().checkPathfinder(); ! boolean result = StendhalRPWorld.get().getPathfinder().queuePath( new QueuedPath(new SimplePathListener(entity), entity, entity .getx(), entity.gety(), dest.getArea(dest.getx(), dest |