]> granicus.if.org Git - nethack/commitdiff
Merge branch 'NetHack-3.6'
authornhmall <nhmall@nethack.org>
Tue, 17 Dec 2019 17:01:49 +0000 (12:01 -0500)
committernhmall <nhmall@nethack.org>
Tue, 17 Dec 2019 17:01:49 +0000 (12:01 -0500)
1  2 
include/extern.h
include/sys.h
src/files.c
src/sys.c
src/trap.c
sys/winnt/windmain.c

Simple merge
diff --cc include/sys.h
Simple merge
diff --cc src/files.c
Simple merge
diff --cc src/sys.c
Simple merge
diff --cc src/trap.c
index 0639421baba5c8ba53d8cd78ae1c3f4dc0c869b7,cc15f22cc7083a1496c93f791cf24041c5f1d4bd..568bcc811adc971ba106cc42c20b206dbe6971a8
@@@ -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!";
          }
          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);
index e0360065ad13b3bdfe4d171b2670160855a04be5,010c11eda4784a69b08770c8283196a6662f1220..3e9d6b7214ba2a2126eee549d8a1e2a9dc47376f
@@@ -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 */