Devilution
Diablo devolved - magic behind the 1996 computer game
|
◆ path_check_equal()
return 2 if pPath is horizontally/vertically aligned with (dx,dy), else 3 This approximates that diagonal movement on a square grid should have a cost of sqrt(2). That's approximately 1.5, so they multiply all step costs by 2, except diagonal steps which are times 3 |