OSDN Git Service

Merge pull request #765 from sikabane-works/release/3.0.0Alpha17
[hengbandforosx/hengbandosx.git] / src / core / game-play.cpp
index b02c0c1..0774f37 100644 (file)
@@ -17,7 +17,6 @@
 #include "cmd-io/cmd-gameoption.h"
 #include "core/asking-player.h"
 #include "core/game-closer.h"
-#include "core/output-updater.h"
 #include "core/player-processor.h"
 #include "core/player-update-types.h"
 #include "core/scores.h"
@@ -151,7 +150,7 @@ static void init_random_seed(player_type *player_ptr, bool new_game)
         init_saved_floors(player_ptr, TRUE);
 
     if (!new_game)
-        process_player_name(player_ptr, FALSE);
+        process_player_name(player_ptr);
 
     if (init_random_seed)
         Rand_state_init();
@@ -177,16 +176,17 @@ static void init_world_floor_info(player_type *player_ptr)
     wipe_o_list(floor_ptr);
 }
 
+/*!
+ * @brief フロア情報をゲームロード時に復帰 
+ * @todo 3.0.Xで削除予定
+ * 1.0.9 以前はセーブ前に player_ptr->riding = -1 としていたので、再設定が必要だった。
+ * もう不要だが、以前のセーブファイルとの互換のために残しておく。
+ */
 static void restore_world_floor_info(player_type *player_ptr)
 {
     write_level = FALSE;
     exe_write_diary(player_ptr, DIARY_GAMESTART, 1, _("                            ----ゲーム再開----", "                            --- Restarted Game ---"));
 
-    /*
-     * todo 3.0.Xで削除予定
-     * 1.0.9 以前はセーブ前に player_ptr->riding = -1 としていたので、再設定が必要だった。
-     * もう不要だが、以前のセーブファイルとの互換のために残しておく。
-     */
     if (player_ptr->riding == -1) {
         player_ptr->riding = 0;
         floor_type *floor_ptr = player_ptr->current_floor_ptr;
@@ -425,7 +425,7 @@ void play_game(player_type *player_ptr, bool new_game, bool browsing_movie)
         player_outfit(player_ptr);
 
     init_io(player_ptr);
-    if (player_ptr->chp < 0)
+    if (player_ptr->chp < 0 && !cheat_immortal)
         player_ptr->is_dead = TRUE;
 
     if (player_ptr->prace == RACE_ANDROID)