Merge remote-tracking branch 'origin/NetHack-3.6.0'

This commit is contained in:
keni
2017-02-05 16:43:49 -05:00
8 changed files with 31 additions and 14 deletions

View File

@@ -18,7 +18,7 @@ STATIC_DCL void FDECL(use_bell, (struct obj **));
STATIC_DCL void FDECL(use_candelabrum, (struct obj *));
STATIC_DCL void FDECL(use_candle, (struct obj **));
STATIC_DCL void FDECL(use_lamp, (struct obj *));
STATIC_DCL void FDECL(light_cocktail, (struct obj *));
STATIC_DCL void FDECL(light_cocktail, (struct obj **));
STATIC_PTR void FDECL(display_jump_positions, (int));
STATIC_DCL void FDECL(use_tinning_kit, (struct obj *));
STATIC_DCL void FDECL(use_figurine, (struct obj **));
@@ -1339,9 +1339,10 @@ struct obj *obj;
}
STATIC_OVL void
light_cocktail(obj)
struct obj *obj; /* obj is a potion of oil */
light_cocktail(optr)
struct obj **optr;
{
struct obj *obj = *optr; /* obj is a potion of oil */
char buf[BUFSZ];
boolean split1off;
@@ -1359,7 +1360,7 @@ struct obj *obj; /* obj is a potion of oil */
* but its easy.
*/
freeinv(obj);
(void) addinv(obj);
*optr = addinv(obj);
return;
} else if (Underwater) {
There("is not enough oxygen to sustain a fire.");
@@ -1392,6 +1393,7 @@ struct obj *obj; /* obj is a potion of oil */
if (obj)
obj->nomerge = 0;
}
*optr = obj;
}
static NEARDATA const char cuddly[] = { TOOL_CLASS, GEM_CLASS, 0 };
@@ -3586,7 +3588,7 @@ doapply()
use_lamp(obj);
break;
case POT_OIL:
light_cocktail(obj);
light_cocktail(&obj);
break;
case EXPENSIVE_CAMERA:
res = use_camera(obj);

View File

@@ -1638,7 +1638,7 @@ lev_by_name(nam)
const char *nam;
{
schar lev = 0;
s_level *slev;
s_level *slev = (s_level *)0;
d_level dlev;
const char *p;
int idx, idxtoo;

View File

@@ -912,8 +912,15 @@ unsigned doname_flags;
break;
}
if (obj->otyp == LEASH && obj->leashmon != 0) {
Sprintf(eos(bp), " (attached to %s)",
a_monnam(find_mid(obj->leashmon, FM_FMON)));
struct monst *mlsh = find_mid(obj->leashmon, FM_FMON);
if (!mlsh) {
impossible("leashed monster not on this level");
obj->leashmon = 0;
} else {
Sprintf(eos(bp), " (attached to %s)",
a_monnam(mlsh));
}
break;
}
if (obj->otyp == CANDELABRUM_OF_INVOCATION) {

View File

@@ -30,7 +30,10 @@ static long final_fpos;
#define newttentry() (struct toptenentry *) alloc(sizeof (struct toptenentry))
#define dealloc_ttentry(ttent) free((genericptr_t) (ttent))
#ifndef NAMSZ
/* Changing NAMSZ can break your existing record/logfile */
#define NAMSZ 10
#endif
#define DTHSZ 100
#define ROLESZ 3