ohitmon: obfree vs delobj
Make missiles that aren't launched by the hero and that hit a monster use the routine that protects the Amulet and invocation items against being deleted. I don't think there are any cases where this matters because those items don't break when they hit something, but be more cautious.
This commit is contained in:
+2
-2
@@ -1,4 +1,4 @@
|
|||||||
/* NetHack 3.7 mthrowu.c $NHDT-Date: 1620923922 2021/05/13 16:38:42 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.114 $ */
|
/* NetHack 3.7 mthrowu.c $NHDT-Date: 1629497158 2021/08/20 22:05:58 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.117 $ */
|
||||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||||
/*-Copyright (c) Pasi Kallinen, 2016. */
|
/*-Copyright (c) Pasi Kallinen, 2016. */
|
||||||
/* NetHack may be freely redistributed. See license for details. */
|
/* NetHack may be freely redistributed. See license for details. */
|
||||||
@@ -154,7 +154,7 @@ drop_throw(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else
|
} else
|
||||||
obfree(obj, (struct obj *) 0);
|
delobj(obj);
|
||||||
return retvalu;
|
return retvalu;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user