unsplitting split object stack
Replace the code that Dean objected to with something a little bit more robust. It doesn't rely on the two stacks being adjacent or having the same inventory letter. It is still vulnerable to having another splitobj() occur between the offending split and its attempted unsplit, or to either of the two halves of a split being extracted from their object chain. As before, failure to unsplit only results in the two halves of the split remaining separate stacks, not anything more drastic like the panic() that prompted all this. Simplification of hallucinated currency names got mixed in with this patch. I haven't bothered separating it back out. Whoever reset PATCHLEVEL to 0 jumped the gun. This patch increments it since change to the 'context' structure breaks save file compatibility, so it will need to undergo another reset before release.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
/* NetHack 3.6 allmain.c $NHDT-Date: 1438505671 2015/08/02 08:54:31 $ $NHDT-Branch: master $:$NHDT-Revision: 1.62 $ */
|
||||
/* NetHack 3.6 allmain.c $NHDT-Date: 1445215016 2015/10/19 00:36:56 $ $NHDT-Branch: master $:$NHDT-Revision: 1.65 $ */
|
||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
|
||||
@@ -376,6 +376,7 @@ boolean resuming;
|
||||
/* once-per-player-input things go here */
|
||||
/****************************************/
|
||||
|
||||
clear_splitobjs();
|
||||
find_ac();
|
||||
if (!context.mv || Blind) {
|
||||
/* redo monsters if hallu or wearing a helm of telepathy */
|
||||
|
||||
Reference in New Issue
Block a user