Allow some variance in corridors and reduce predictability
The corridors used to head towards the goal using the straightest possible line, often making a zig-zag beeline. Allow some slight variance, sometimes going straight instead of turning, reducing the predictability, and making those monotonously turning corridors less likely.
This commit is contained in:
@@ -2148,6 +2148,12 @@ schar ftyp, btyp;
|
||||
dix = abs(xx - tx);
|
||||
diy = abs(yy - ty);
|
||||
|
||||
if ((dix > diy) && diy && !rn2(dix-diy+1)) {
|
||||
dix = 0;
|
||||
} else if ((diy > dix) && dix && !rn2(diy-dix+1)) {
|
||||
diy = 0;
|
||||
}
|
||||
|
||||
/* do we have to change direction ? */
|
||||
if (dy && dix > diy) {
|
||||
register int ddx = (xx > tx) ? -1 : 1;
|
||||
|
||||
Reference in New Issue
Block a user