splattered oil fix
splatter_burning_oil() is called when a lit potion of oil gets broken, and it can dish out fatal damage to the hero. An earlier fix to prevent a light-source panic (thrown item is not on any of the object lists) during bones creation didn't address leaving that lit potion intact if it was on the floor (which can happen if the breakage is caused by striking or force bolt rather than its being thrown or kicked). Use the existing obj->in_use mechanism as a more general fix, after teaching bones code that it applies to other things besides the hero's inventory.
This commit is contained in:
10
src/bones.c
10
src/bones.c
@@ -57,11 +57,17 @@ resetobjs(ochain,restore)
|
||||
struct obj *ochain;
|
||||
boolean restore;
|
||||
{
|
||||
struct obj *otmp;
|
||||
struct obj *otmp, *nobj;
|
||||
|
||||
for (otmp = ochain; otmp; otmp = otmp->nobj) {
|
||||
for (otmp = ochain; otmp; otmp = nobj) {
|
||||
nobj = otmp->nobj;
|
||||
if (otmp->cobj)
|
||||
resetobjs(otmp->cobj,restore);
|
||||
if (otmp->in_use) {
|
||||
obj_extract_self(otmp);
|
||||
dealloc_obj(otmp);
|
||||
continue;
|
||||
}
|
||||
|
||||
if (restore) {
|
||||
/* artifact bookeeping needs to be done during
|
||||
|
||||
Reference in New Issue
Block a user