B12002 - displacing pets thru narrow openings
Add another check to domove to detect an attempt to displace a pet through a narrow opening.
This commit is contained in:
@@ -280,6 +280,7 @@ document "sound" option in Guidebook
|
||||
destroy traps that are buried by boulders dropped in water
|
||||
renamed debug commands: light sources -> lightsources,
|
||||
monpoly_control -> monpolycontrol
|
||||
detect attempt to swap places with big pet through narrow opening
|
||||
|
||||
|
||||
Platform- and/or Interface-Specific Fixes
|
||||
|
||||
@@ -1279,6 +1279,13 @@ domove()
|
||||
sobj_at(BOULDER, trap->tx, trap->ty)) {
|
||||
/* can't swap places with pet pinned in a pit by a boulder */
|
||||
u.ux = u.ux0, u.uy = u.uy0; /* didn't move after all */
|
||||
} else if (u.ux0 != x && u.uy0 != y &&
|
||||
bad_rock(mtmp->data, x, u.uy0) &&
|
||||
bad_rock(mtmp->data, u.ux0, y) &&
|
||||
(bigmonst(mtmp->data) || (curr_mon_load(mtmp) > 600))) {
|
||||
/* can't swap places when pet won't fit thru the opening */
|
||||
u.ux = u.ux0, u.uy = u.uy0; /* didn't move after all */
|
||||
You("stop. %s won't fit through.", upstart(y_monnam(mtmp)));
|
||||
} else {
|
||||
char pnambuf[BUFSZ];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user