Server: Minor optimization of pathfinding algorithm.