fix pyrolisk egg panic when eating from floor
From a change made about two and half months ago: eating a pyrolisk egg tried to use it up from inventory even when it was on the floor. That would trigger an object lost panic.
This commit is contained in:
@@ -2012,6 +2012,7 @@ having #terrain display gas cloud regions as if they were traps didn't work
|
||||
sensed via ESP
|
||||
when a monster within a gas cloud was displayed on the map because the hero
|
||||
was next to it, it remained displayed if hero moved away
|
||||
eating a pyrolisk egg on the floor triggered an "object lost" panic
|
||||
|
||||
|
||||
Fixes to 3.7.0-x Platform and/or Interface Problems Exposed Via git Repository
|
||||
|
||||
@@ -2028,7 +2028,10 @@ fprefx(struct obj *otmp)
|
||||
switch (otmp->otyp) {
|
||||
case EGG:
|
||||
if (otmp->corpsenm == PM_PYROLISK) {
|
||||
useup(otmp);
|
||||
if (carried(otmp))
|
||||
useup(otmp);
|
||||
else
|
||||
useupf(otmp, 1L);
|
||||
explode(u.ux, u.uy, -11, d(3, 6), 0, EXPL_FIERY);
|
||||
return FALSE;
|
||||
} else if (stale_egg(otmp)) {
|
||||
@@ -2842,8 +2845,8 @@ doeat(void)
|
||||
|
||||
|
||||
if (otmp == svc.context.victual.piece) {
|
||||
boolean one_bite_left
|
||||
= (svc.context.victual.usedtime + 1 >= svc.context.victual.reqtime);
|
||||
boolean one_bite_left = (svc.context.victual.usedtime + 1
|
||||
>= svc.context.victual.reqtime);
|
||||
|
||||
/* If they weren't able to choke, they don't suddenly become able to
|
||||
* choke just because they were interrupted. On the other hand, if
|
||||
|
||||
Reference in New Issue
Block a user