fix an impossible() on pick-up from stomach
This commit is contained in:
@@ -2234,6 +2234,9 @@ cursed magic whistle could teleport hero on no-teleport levels
|
|||||||
give a brief explanation when receiving a wish for acquiring the Amulet
|
give a brief explanation when receiving a wish for acquiring the Amulet
|
||||||
teleportation traps no longer teleport you on levels made temporarily
|
teleportation traps no longer teleport you on levels made temporarily
|
||||||
no-teleport by the presence of a monster
|
no-teleport by the presence of a monster
|
||||||
|
an attempt to pick up an object from a monster's stomach would trigger
|
||||||
|
an impossible() in newsym() due to object having no ox,oy coordinates
|
||||||
|
set; set the coordinates to the monster's at the start of pick_obj()
|
||||||
|
|
||||||
|
|
||||||
Fixes to 3.7.0-x Platform and/or Interface Problems Exposed Via git Repository
|
Fixes to 3.7.0-x Platform and/or Interface Problems Exposed Via git Repository
|
||||||
|
|||||||
+18
-2
@@ -1897,8 +1897,24 @@ struct obj *
|
|||||||
pick_obj(struct obj *otmp)
|
pick_obj(struct obj *otmp)
|
||||||
{
|
{
|
||||||
struct obj *result;
|
struct obj *result;
|
||||||
int ox = otmp->ox, oy = otmp->oy;
|
int ox, oy;
|
||||||
boolean robshop = (!u.uswallow && otmp != uball && costly_spot(ox, oy));
|
boolean robshop = FALSE;
|
||||||
|
|
||||||
|
if (otmp->ox == 0 && otmp->oy == 0) {
|
||||||
|
if (u.uswallow && u.ustuck && otmp->where == OBJ_MINVENT
|
||||||
|
&& otmp->ocarry == u.ustuck) {
|
||||||
|
otmp->ox = u.ustuck->mx;
|
||||||
|
otmp->oy = u.ustuck->my;
|
||||||
|
} else {
|
||||||
|
/* this will be a problem for newsym below */
|
||||||
|
impossible("otmp has no location coordinates <%d, %d> where=%d.",
|
||||||
|
otmp->ox, otmp->oy, otmp->where);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
ox = otmp->ox;
|
||||||
|
oy = otmp->oy;
|
||||||
|
robshop = (!u.uswallow && otmp != uball && costly_spot(ox, oy));
|
||||||
|
|
||||||
obj_extract_self(otmp);
|
obj_extract_self(otmp);
|
||||||
newsym(ox, oy);
|
newsym(ox, oy);
|
||||||
|
|||||||
Reference in New Issue
Block a user