From: nhmall Date: Tue, 17 Dec 2019 17:01:49 +0000 (-0500) Subject: Merge branch 'NetHack-3.6' X-Git-Tag: NetHack-3.7.0_WIP~126 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=5d4208cd1571a8ebd46393462fc0c47bd8283a5c;p=nethack Merge branch 'NetHack-3.6' --- 5d4208cd1571a8ebd46393462fc0c47bd8283a5c diff --cc src/trap.c index 0639421ba,cc15f22cc..568bcc811 --- a/src/trap.c +++ b/src/trap.c @@@ -486,11 -489,11 +486,11 @@@ 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(youmonst.data)) ++ || ((Flying || is_clinger(g.youmonst.data)) + && !(ftflags & TOOKPLUNGE)) || (Inhell && !u.uevent.invoked && newlevel == bottom)) { dont_fall = "don't fall in."; - } else if (youmonst.data->msize >= MZ_HUGE) { + } else if (g.youmonst.data->msize >= MZ_HUGE) { dont_fall = "don't fit through."; } else if (!next_to_u()) { dont_fall = "are jerked back by your pet!"; @@@ -505,9 -508,13 +505,13 @@@ } 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(youmonst.data)) ++ 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); diff --cc sys/winnt/windmain.c index e0360065a,010c11eda..3e9d6b721 --- a/sys/winnt/windmain.c +++ b/sys/winnt/windmain.c @@@ -177,29 -309,43 +308,43 @@@ set_default_prefix_locations(const cha strcpy(executable_path, get_executable_path()); append_slash(executable_path); - build_known_folder_path(&FOLDERID_Profile, profile_path, - sizeof(profile_path), FALSE); - - build_known_folder_path(&FOLDERID_Profile, versioned_profile_path, - sizeof(profile_path), TRUE); - - build_known_folder_path(&FOLDERID_LocalAppData, - versioned_user_data_path, sizeof(versioned_user_data_path), TRUE); - - build_known_folder_path(&FOLDERID_ProgramData, - versioned_global_data_path, sizeof(versioned_global_data_path), TRUE); - - g.fqn_prefix[SYSCONFPREFIX] = versioned_global_data_path; - g.fqn_prefix[CONFIGPREFIX] = profile_path; - g.fqn_prefix[HACKPREFIX] = versioned_profile_path; - g.fqn_prefix[SAVEPREFIX] = versioned_user_data_path; - g.fqn_prefix[LEVELPREFIX] = versioned_user_data_path; - g.fqn_prefix[BONESPREFIX] = versioned_global_data_path; - g.fqn_prefix[SCOREPREFIX] = versioned_global_data_path; - g.fqn_prefix[LOCKPREFIX] = versioned_global_data_path; - g.fqn_prefix[TROUBLEPREFIX] = versioned_profile_path; - g.fqn_prefix[DATAPREFIX] = executable_path; - + if (test_portable_config(executable_path, portable_device_top_path, + sizeof portable_device_top_path)) { + if (illegal_dir(portable_device_top_path, executable_path)) + windows_startup_state = 2; - fqn_prefix[SYSCONFPREFIX] = executable_path; - fqn_prefix[CONFIGPREFIX] = portable_device_top_path; - fqn_prefix[HACKPREFIX] = portable_device_top_path; - fqn_prefix[SAVEPREFIX] = portable_device_top_path; - fqn_prefix[LEVELPREFIX] = portable_device_top_path; - fqn_prefix[BONESPREFIX] = portable_device_top_path; - fqn_prefix[SCOREPREFIX] = portable_device_top_path; - fqn_prefix[LOCKPREFIX] = portable_device_top_path; - fqn_prefix[TROUBLEPREFIX] = portable_device_top_path; - fqn_prefix[DATAPREFIX] = executable_path; ++ g.fqn_prefix[SYSCONFPREFIX] = executable_path; ++ g.fqn_prefix[CONFIGPREFIX] = portable_device_top_path; ++ g.fqn_prefix[HACKPREFIX] = portable_device_top_path; ++ g.fqn_prefix[SAVEPREFIX] = portable_device_top_path; ++ g.fqn_prefix[LEVELPREFIX] = portable_device_top_path; ++ g.fqn_prefix[BONESPREFIX] = portable_device_top_path; ++ g.fqn_prefix[SCOREPREFIX] = portable_device_top_path; ++ g.fqn_prefix[LOCKPREFIX] = portable_device_top_path; ++ g.fqn_prefix[TROUBLEPREFIX] = portable_device_top_path; ++ g.fqn_prefix[DATAPREFIX] = executable_path; + } else { + build_known_folder_path(&FOLDERID_Profile, profile_path, + sizeof(profile_path), FALSE); + + build_known_folder_path(&FOLDERID_Profile, versioned_profile_path, + sizeof(profile_path), TRUE); + + build_known_folder_path(&FOLDERID_LocalAppData, + versioned_user_data_path, sizeof(versioned_user_data_path), TRUE); + + build_known_folder_path(&FOLDERID_ProgramData, + versioned_global_data_path, sizeof(versioned_global_data_path), TRUE); - fqn_prefix[SYSCONFPREFIX] = versioned_global_data_path; - fqn_prefix[CONFIGPREFIX] = profile_path; - fqn_prefix[HACKPREFIX] = versioned_profile_path; - fqn_prefix[SAVEPREFIX] = versioned_user_data_path; - fqn_prefix[LEVELPREFIX] = versioned_user_data_path; - fqn_prefix[BONESPREFIX] = versioned_global_data_path; - fqn_prefix[SCOREPREFIX] = versioned_global_data_path; - fqn_prefix[LOCKPREFIX] = versioned_global_data_path; - fqn_prefix[TROUBLEPREFIX] = versioned_profile_path; - fqn_prefix[DATAPREFIX] = executable_path; ++ g.fqn_prefix[SYSCONFPREFIX] = versioned_global_data_path; ++ g.fqn_prefix[CONFIGPREFIX] = profile_path; ++ g.fqn_prefix[HACKPREFIX] = versioned_profile_path; ++ g.fqn_prefix[SAVEPREFIX] = versioned_user_data_path; ++ g.fqn_prefix[LEVELPREFIX] = versioned_user_data_path; ++ g.fqn_prefix[BONESPREFIX] = versioned_global_data_path; ++ g.fqn_prefix[SCOREPREFIX] = versioned_global_data_path; ++ g.fqn_prefix[LOCKPREFIX] = versioned_global_data_path; ++ g.fqn_prefix[TROUBLEPREFIX] = versioned_profile_path; ++ g.fqn_prefix[DATAPREFIX] = executable_path; + } } /* copy file if destination does not exist */