public AstarNode allocNode(double X, double Y, int Xpos, int Ypos) { try { AstarNode tmpNode = new AstarNode(); tmpNode.x = X; tmpNode.y = Y; tmpNode.x2 = X + this.gridSize; tmpNode.y2 = Y + this.gridSize; tmpNode.xpos = Xpos; tmpNode.ypos = Ypos; tmpNode.passable = checkNodeWalls(tmpNode); tmpNode.calcMidPoint(); // nodelist.Add(tmpNode); nodelist is now only useful for debugging... return(tmpNode); } catch (Exception e) { Globals.l2net_home.Add_Error("ERROR:" + e.Message); } return(null); }
public AstarNode allocNode(double X, double Y, int Xpos, int Ypos) { try { AstarNode tmpNode = new AstarNode(); tmpNode.x = X; tmpNode.y = Y; tmpNode.x2 = X + this.gridSize; tmpNode.y2 = Y + this.gridSize; tmpNode.xpos = Xpos; tmpNode.ypos = Ypos; tmpNode.passable = checkNodeWalls(tmpNode); tmpNode.calcMidPoint(); // nodelist.Add(tmpNode); nodelist is now only useful for debugging... return tmpNode; } catch(Exception e) { Globals.l2net_home.Add_Error("ERROR:" + e.Message); } return null; }