Merge branch 'NetHack-3.6'

This commit is contained in:
nhmall
2019-12-17 12:01:49 -05:00
7 changed files with 218 additions and 33 deletions

View File

@@ -2591,6 +2591,12 @@ char *origbuf;
if (sysopt.dumplogfile)
free((genericptr_t) sysopt.dumplogfile);
sysopt.dumplogfile = dupstr(bufp);
#endif
#ifdef WIN32
} else if (src == SET_IN_SYS && match_varname(buf, "portable_device_top", 8)) {
if (sysopt.portable_device_top)
free((genericptr_t) sysopt.portable_device_top);
sysopt.portable_device_top = dupstr(bufp);
#endif
} else if (src == SET_IN_SYS && match_varname(buf, "GENERICUSERS", 12)) {
if (sysopt.genericusers)
@@ -4320,6 +4326,16 @@ reveal_paths(VOID_ARGS)
#endif /* ?DUMPLOG */
raw_printf("No end-of-game disclosure file (%s).", nodumpreason);
#ifdef WIN32
if (sysopt.portable_device_top) {
const char *pd = get_portable_device();
raw_printf("Writable folder for portable device config (sysconf %s):",
"portable_device_top");
raw_printf(" \"%s\"", pd);
}
#endif
/* personal configuration file */
buf[0] = '\0';

View File

@@ -34,6 +34,9 @@ sys_early_init()
#endif
#ifdef DUMPLOG
sysopt.dumplogfile = (char *) 0;
#endif
#ifdef WIN32
sysopt.portable_device_top = (char *) 0;
#endif
sysopt.env_dbgfl = 0; /* haven't checked getenv("DEBUGFILES") yet */
sysopt.shellers = (char *) 0;
@@ -105,6 +108,12 @@ sysopt_release()
#ifdef DUMPLOG
if (sysopt.dumplogfile)
free((genericptr_t)sysopt.dumplogfile), sysopt.dumplogfile=(char *)0;
#endif
#ifdef WIN32
if (sysopt.portable_device_top) {
free((genericptr_t) sysopt.portable_device_top);
sysopt.portable_device_top = (char *) 0;
}
#endif
if (sysopt.genericusers)
free((genericptr_t) sysopt.genericusers),

View File

@@ -486,8 +486,8 @@ unsigned ftflags;
; /* KMH -- You can't escape the Sokoban level traps */
else if (Levitation || u.ustuck
|| (!Can_fall_thru(&u.uz) && !levl[u.ux][u.uy].candig)
|| (Flying && !(ftflags & TOOKPLUNGE))
|| is_clinger(g.youmonst.data)
|| ((Flying || is_clinger(g.youmonst.data))
&& !(ftflags & TOOKPLUNGE))
|| (Inhell && !u.uevent.invoked && newlevel == bottom)) {
dont_fall = "don't fall in.";
} else if (g.youmonst.data->msize >= MZ_HUGE) {
@@ -505,9 +505,13 @@ unsigned ftflags;
}
return;
}
if (Flying && (ftflags & TOOKPLUNGE) && td && t)
You("swoop down %s!", (t->ttyp == TRAPDOOR)
? "through the trap door" : "into the gaping hole");
if ((Flying || is_clinger(g.youmonst.data))
&& (ftflags & TOOKPLUNGE) && td && t)
You("%s down %s!",
Flying ? "swoop" : "deliberately drop",
(t->ttyp == TRAPDOOR)
? "through the trap door"
: "into the gaping hole");
if (*u.ushops)
shopdig(1);