#include "pathfinder.h"
#include "serverenvironment.h"
-#include "gamedef.h"
+#include "server.h"
#include "nodedef.h"
-#include "map.h"
-#include "log.h"
-#include "irr_aabb3d.h"
-#include "util/basic_macros.h"
//#define PATHFINDER_DEBUG
//#define PATHFINDER_CALC_TIME
#define DEBUG_OUT(a) while(0)
#define INFO_TARGET infostream << "Pathfinder: "
#define VERBOSE_TARGET verbosestream << "Pathfinder: "
-#define ERROR_TARGET errorstream << "Pathfinder: "
+#define ERROR_TARGET warningstream << "Pathfinder: "
#endif
/******************************************************************************/
* @param dir direction to set cost for
* @cost cost to set
*/
- void setCost(v3s16 dir, PathCost cost);
+ void setCost(v3s16 dir, const PathCost &cost);
bool valid; /**< node is on surface */
bool target; /**< node is target position */
}
/******************************************************************************/
-void PathGridnode::setCost(v3s16 dir, PathCost cost)
+void PathGridnode::setCost(v3s16 dir, const PathCost &cost)
{
if (dir.X > 0) {
directions[DIR_XP] = cost;