kick/joust monster positioning (trunk only)
From a 7.5 year old news posting (with a reply by Kevin Hugo speaking
on behalf of slash'em...): when a monster "nimbly jumps to evade" hero's
kick, it can pass through walls and grid bugs can jump off their grid.
Likewise when a joust or staggering blow knocks a monster back, it could
move grid bugs diagonally. This fixes both cases.
Offhand I can't think of any other non-standard movement situations
which might need similar handling, but it wouldn't surprise me if there
are some. Leashed movement is close but I don't think maybe_mnexto helps.
This commit is contained in:
@@ -724,6 +724,8 @@ mhurtle(mon, dx, dy, range)
|
||||
dx = sgn(dx);
|
||||
dy = sgn(dy);
|
||||
if(!range || (!dx && !dy)) return; /* paranoia */
|
||||
/* don't let grid bugs be hurtled diagonally */
|
||||
if (dx && dy && NODIAG(monsndx(mon->data))) return;
|
||||
|
||||
/* Send the monster along the path */
|
||||
mc.x = mon->mx;
|
||||
|
||||
Reference in New Issue
Block a user