; /* 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);
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 */