Remove diagonal pathfinding from A*, since tiles may not necessarily consume a full tile. Adjusted Wizard Teleport range accordingly.
This commit is contained in:
@@ -70,14 +70,14 @@ void Pathfinding::Initialize(){
|
||||
nodes[y*game->GetCurrentMapData().width + x].vecNeighbours.push_back(&nodes[(y + 0) * game->GetCurrentMapData().width + (x - 1)]);
|
||||
if(x<game->GetCurrentMapData().width-1)
|
||||
nodes[y*game->GetCurrentMapData().width + x].vecNeighbours.push_back(&nodes[(y + 0) * game->GetCurrentMapData().width + (x + 1)]);
|
||||
if (y>0 && x>0)
|
||||
/*if (y>0 && x>0)
|
||||
nodes[y*game->GetCurrentMapData().width + x].vecNeighbours.push_back(&nodes[(y - 1) * game->GetCurrentMapData().width + (x - 1)]);
|
||||
if (y<game->GetCurrentMapData().height-1 && x>0)
|
||||
nodes[y*game->GetCurrentMapData().width + x].vecNeighbours.push_back(&nodes[(y + 1) * game->GetCurrentMapData().width + (x - 1)]);
|
||||
if (y>0 && x<game->GetCurrentMapData().width-1)
|
||||
nodes[y*game->GetCurrentMapData().width + x].vecNeighbours.push_back(&nodes[(y - 1) * game->GetCurrentMapData().width + (x + 1)]);
|
||||
if (y<game->GetCurrentMapData().height - 1 && x<game->GetCurrentMapData().width-1)
|
||||
nodes[y*game->GetCurrentMapData().width + x].vecNeighbours.push_back(&nodes[(y + 1) * game->GetCurrentMapData().width + (x + 1)]);
|
||||
nodes[y*game->GetCurrentMapData().width + x].vecNeighbours.push_back(&nodes[(y + 1) * game->GetCurrentMapData().width + (x + 1)]);*/
|
||||
}
|
||||
|
||||
// Manually position the start and end markers so they are not nullptr
|
||||
|
||||
Reference in New Issue
Block a user