shithub: asif

Download patch

ref: d5ed56a1568715bceaad3edf3dd0e20722560967
parent: 38d4b2728285793eadee9681aa33c2af9e9d85dd
author: qwx <qwx@sciops.net>
date: Wed Mar 30 01:42:53 EDT 2022

grid: further tweak paths by penalizing diagonal movement slightly

--- a/path/grid.c
+++ b/path/grid.c
@@ -50,8 +50,7 @@
 		assert(s >= map && s < map + mapwidth * mapheight);
 		if(isblocked(s))
 			continue;
-		s->Δg = 1;
-		//s->Δg = dtab[i] != 0 && dtab[i+1] != 0 ? SQRT2 : 1;
+		s->Δg = dtab[i] != 0 && dtab[i+1] != 0 ? 1+0.001 : 1.0;
 		*np++ = s;
 	}
 	return suc;