fix up a bad commit
This commit is contained in:
@@ -571,7 +571,7 @@ int x, y;
|
|||||||
int ox, oy, *range = (int *) arg;
|
int ox, oy, *range = (int *) arg;
|
||||||
struct obj *obj;
|
struct obj *obj;
|
||||||
struct monst *mon;
|
struct monst *mon;
|
||||||
boolean may_pass = TRUE;
|
boolean may_pass = TRUE, via_jumping, stopping_short;
|
||||||
struct trap *ttmp;
|
struct trap *ttmp;
|
||||||
int dmg = 0;
|
int dmg = 0;
|
||||||
|
|
||||||
@@ -583,6 +583,8 @@ int x, y;
|
|||||||
} else if (*range == 0) {
|
} else if (*range == 0) {
|
||||||
return FALSE; /* previous step wants to stop now */
|
return FALSE; /* previous step wants to stop now */
|
||||||
}
|
}
|
||||||
|
via_jumping = (EWwalking & I_SPECIAL) != 0L;
|
||||||
|
stopping_short = (via_jumping && *range < 2);
|
||||||
|
|
||||||
if (!Passes_walls || !(may_pass = may_passwall(x, y))) {
|
if (!Passes_walls || !(may_pass = may_passwall(x, y))) {
|
||||||
boolean odoor_diag = (IS_DOOR(levl[x][y].typ)
|
boolean odoor_diag = (IS_DOOR(levl[x][y].typ)
|
||||||
@@ -662,12 +664,8 @@ int x, y;
|
|||||||
|
|
||||||
mon->mundetected = 0; /* wakeup() will handle mimic */
|
mon->mundetected = 0; /* wakeup() will handle mimic */
|
||||||
mnam = a_monnam(mon); /* after unhiding */
|
mnam = a_monnam(mon); /* after unhiding */
|
||||||
pronoun = mhim(mon);
|
pronoun = noit_mhim(mon);
|
||||||
if (!strcmp(mnam, "it")) {
|
if (!strcmp(mnam, "it")) {
|
||||||
/* mhim() uses pronoun_gender() which forces neuter if monster
|
|
||||||
can't be seen; we want him/her for humanoid sensed by touch */
|
|
||||||
if (!strcmp(pronoun, "it") && humanoid(mon->data))
|
|
||||||
pronoun = genders[mon->female].him;
|
|
||||||
mnam = !strcmp(pronoun, "it") ? "something" : "someone";
|
mnam = !strcmp(pronoun, "it") ? "something" : "someone";
|
||||||
}
|
}
|
||||||
if (!glyph_is_monster(glyph) && !glyph_is_invisible(glyph))
|
if (!glyph_is_monster(glyph) && !glyph_is_invisible(glyph))
|
||||||
@@ -710,12 +708,17 @@ int x, y;
|
|||||||
vision_recalc(1); /* update for new position */
|
vision_recalc(1); /* update for new position */
|
||||||
flush_screen(1);
|
flush_screen(1);
|
||||||
|
|
||||||
if (is_pool(x, y) && !u.uinwater
|
if (is_pool(x, y) && !u.uinwater) {
|
||||||
&& ((Is_waterlevel(&u.uz) && levl[x][y].typ == WATER)
|
if ((Is_waterlevel(&u.uz) && levl[x][y].typ == WATER)
|
||||||
|| !(Levitation || Flying || Wwalking))) {
|
|| !(Levitation || Flying || Wwalking)) {
|
||||||
multi = 0; /* can move, so drown() allows crawling out of water */
|
multi = 0; /* can move, so drown() allows crawling out of water */
|
||||||
(void) drown();
|
(void) drown();
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
} else if (!Is_waterlevel(&u.uz) && !stopping_short) {
|
||||||
|
Norep("You move over %s.", an(is_moat(x, y) ? "moat" : "pool"));
|
||||||
|
}
|
||||||
|
} else if (is_lava(x, y) && !stopping_short) {
|
||||||
|
Norep("You move over some lava.");
|
||||||
}
|
}
|
||||||
|
|
||||||
/* FIXME:
|
/* FIXME:
|
||||||
@@ -727,7 +730,9 @@ int x, y;
|
|||||||
* ones that we have not yet tested.
|
* ones that we have not yet tested.
|
||||||
*/
|
*/
|
||||||
if ((ttmp = t_at(x, y)) != 0) {
|
if ((ttmp = t_at(x, y)) != 0) {
|
||||||
if (ttmp->ttyp == MAGIC_PORTAL) {
|
if (stopping_short) {
|
||||||
|
; /* see the comment above hurtle_jump() */
|
||||||
|
} else if (ttmp->ttyp == MAGIC_PORTAL) {
|
||||||
dotrap(ttmp, 0);
|
dotrap(ttmp, 0);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
} else if (ttmp->ttyp == VIBRATING_SQUARE) {
|
} else if (ttmp->ttyp == VIBRATING_SQUARE) {
|
||||||
@@ -735,11 +740,12 @@ int x, y;
|
|||||||
dotrap(ttmp, 0); /* doesn't print messages */
|
dotrap(ttmp, 0); /* doesn't print messages */
|
||||||
} else if (ttmp->ttyp == FIRE_TRAP) {
|
} else if (ttmp->ttyp == FIRE_TRAP) {
|
||||||
dotrap(ttmp, 0);
|
dotrap(ttmp, 0);
|
||||||
} else if ((ttmp->ttyp == PIT || ttmp->ttyp == SPIKED_PIT
|
} else if ((is_pit(ttmp->ttyp) || is_hole(ttmp->ttyp))
|
||||||
|| ttmp->ttyp == HOLE || ttmp->ttyp == TRAPDOOR)
|
|
||||||
&& Sokoban) {
|
&& Sokoban) {
|
||||||
/* Air currents overcome the recoil */
|
/* air currents overcome the recoil in Sokoban;
|
||||||
dotrap(ttmp, 0);
|
when jumping, caller performs last step and enters trap */
|
||||||
|
if (!via_jumping)
|
||||||
|
dotrap(ttmp, 0);
|
||||||
*range = 0;
|
*range = 0;
|
||||||
return TRUE;
|
return TRUE;
|
||||||
} else {
|
} else {
|
||||||
@@ -1128,6 +1134,8 @@ boolean twoweap; /* used to restore twoweapon mode if wielded weapon returns */
|
|||||||
mon = u.ustuck;
|
mon = u.ustuck;
|
||||||
bhitpos.x = mon->mx;
|
bhitpos.x = mon->mx;
|
||||||
bhitpos.y = mon->my;
|
bhitpos.y = mon->my;
|
||||||
|
if (tethered_weapon)
|
||||||
|
tmp_at(DISP_TETHER, obj_to_glyph(obj));
|
||||||
} else if (u.dz) {
|
} else if (u.dz) {
|
||||||
if (u.dz < 0
|
if (u.dz < 0
|
||||||
/* Mjollnir must we wielded to be thrown--caller verifies this;
|
/* Mjollnir must we wielded to be thrown--caller verifies this;
|
||||||
@@ -1274,12 +1282,20 @@ boolean twoweap; /* used to restore twoweapon mode if wielded weapon returns */
|
|||||||
/* missile has already been handled */
|
/* missile has already been handled */
|
||||||
if (tethered_weapon) tmp_at(DISP_END, 0);
|
if (tethered_weapon) tmp_at(DISP_END, 0);
|
||||||
} else if (u.uswallow) {
|
} else if (u.uswallow) {
|
||||||
if (tethered_weapon)
|
if (tethered_weapon) {
|
||||||
tmp_at(DISP_END, 0);
|
tmp_at(DISP_END, 0);
|
||||||
/* ball is not picked up by monster */
|
pline("%s returns to your hand!", The(xname(thrownobj)));
|
||||||
if (obj != uball)
|
thrownobj = addinv(thrownobj);
|
||||||
(void) mpickobj(u.ustuck, obj);
|
(void) encumber_msg();
|
||||||
thrownobj = (struct obj *) 0;
|
if (thrownobj->owornmask & W_QUIVER) /* in case addinv() autoquivered */
|
||||||
|
setuqwep((struct obj *) 0);
|
||||||
|
setuwep(thrownobj);
|
||||||
|
} else {
|
||||||
|
/* ball is not picked up by monster */
|
||||||
|
if (obj != uball)
|
||||||
|
(void) mpickobj(u.ustuck, obj);
|
||||||
|
thrownobj = (struct obj *) 0;
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
/* Mjollnir must we wielded to be thrown--caller verifies this;
|
/* Mjollnir must we wielded to be thrown--caller verifies this;
|
||||||
aklys must we wielded as primary to return when thrown */
|
aklys must we wielded as primary to return when thrown */
|
||||||
|
|||||||
Reference in New Issue
Block a user