OSDN Git Service

[refactor] #39076 /* Skip non-objects */ を削除。
[hengband/hengband.git] / src / files.c
index 9268167..d1d7c35 100644 (file)
 
 
 #include "angband.h"
+#include "util.h"
+
+#include "birth.h"
+#include "files.h"
+
+#include "bldg.h"
+
 #include "world.h"
 #include "player-status.h"
 #include "sort.h"
 #include "store.h"
 #include "artifact.h"
 #include "avatar.h"
+#include "shoot.h"
+#include "player-move.h"
+#include "patron.h"
+#include "monster.h"
+#include "monster-process.h"
+#include "monster-status.h"
+#include "object-flavor.h"
+#include "object-hook.h"
+#include "realm-hex.h"
+#include "cmd-pet.h"
+#include "spells.h"
+#include "term.h"
+#include "view-mainwindow.h"
+#include "floor-events.h"
+#include "dungeon-file.h"
+#include "init.h"
+#include "monster-spell.h"
 
 
 /*
@@ -563,8 +587,8 @@ errr process_pref_file_command(char *buf)
                        }
                        break;
 
-               /* Process "X:<str>" -- turn option off */
-               /* Process "Y:<str>" -- turn option on */
+               /* Process "X:<str>" -- current_world_ptr->game_turn option off */
+               /* Process "Y:<str>" -- current_world_ptr->game_turn option on */
                case 'X':
                case 'Y':
                        for (i = 0; option_info[i].o_desc; i++)
@@ -622,7 +646,7 @@ errr process_pref_file_command(char *buf)
                                if (streq(gf_desc[i].name, buf + 2))
                                {
                                        /* Remember this color set */
-                                       gf_color[gf_desc[i].num] = quark_add(t);
+                                       gf_color[gf_desc[i].num] = (TERM_COLOR)quark_add(t);
 
                                        /* Success */
                                        return 0;
@@ -1334,8 +1358,6 @@ errr check_time_init(void)
                if (prefix(buf, "FRI:")) strcpy(days[5], buf);
                if (prefix(buf, "SAT:")) strcpy(days[6], buf);
        }
-
-       /* Close it */
        my_fclose(fp);
 
 #endif
@@ -1819,8 +1841,8 @@ static void display_player_middle(void)
                }
                else
                {
-                       if (MON_FAST(&m_list[p_ptr->riding])) tmp_speed += 10;
-                       if (MON_SLOW(&m_list[p_ptr->riding])) tmp_speed -= 10;
+                       if (MON_FAST(&current_floor_ptr->m_list[p_ptr->riding])) tmp_speed += 10;
+                       if (MON_SLOW(&current_floor_ptr->m_list[p_ptr->riding])) tmp_speed -= 10;
                }
 
                if (tmp_speed)
@@ -1905,7 +1927,7 @@ static void display_player_middle(void)
                display_player_one_line(ENTRY_SP, format("%4d/%4d", p_ptr->csp , p_ptr->msp), TERM_RED);
 
        /* Dump play time */
-       display_player_one_line(ENTRY_PLAY_TIME, format("%.2lu:%.2lu:%.2lu", playtime/(60*60), (playtime/60)%60, playtime%60), TERM_L_GREEN);
+       display_player_one_line(ENTRY_PLAY_TIME, format("%.2lu:%.2lu:%.2lu", current_world_ptr->play_time/(60*60), (current_world_ptr->play_time/60)%60, current_world_ptr->play_time%60), TERM_L_GREEN);
 }
 
 
@@ -1927,8 +1949,6 @@ static concptr likert(int x, int y)
        static char dummy[20] = "", dummy2[20] = "";
        memset(dummy, 0, strlen(dummy));
        memset(dummy2, 0, strlen(dummy2));
-
-       /* Paranoia */
        if (y <= 0) y = 1;
 
        if(show_actual_value)
@@ -2030,7 +2050,7 @@ static void display_player_various(void)
        int             shots, shot_frac;
        bool dokubari;
 
-       object_type             *o_ptr;
+       object_type *o_ptr;
 
        if (p_ptr->muta2 & MUT2_HORNS)     muta_att++;
        if (p_ptr->muta2 & MUT2_SCOR_TAIL) muta_att++;
@@ -2792,7 +2812,7 @@ static void tim_player_flags(BIT_FLAGS flgs[TR_FLAG_SIZE])
  * @param mode オプション
  * @return なし
  */
-static void display_player_equippy(TERM_LEN y, TERM_LEN x, BIT_FLAGS16 mode)
+void display_player_equippy(TERM_LEN y, TERM_LEN x, BIT_FLAGS16 mode)
 {
        int i, max_i;
 
@@ -2828,15 +2848,6 @@ static void display_player_equippy(TERM_LEN y, TERM_LEN x, BIT_FLAGS16 mode)
 
 
 /*!
- * @brief プレイヤーの装備一覧シンボルを固定位置に表示する
- * @return なし
- */
-void print_equippy(void)
-{
-       display_player_equippy(ROW_EQUIPPY, COL_EQUIPPY, 0);
-}
-
-/*!
  * @brief プレイヤーの装備による免疫フラグを返す
  * @param flgs フラグを保管する配列
  * @return なし
@@ -3929,7 +3940,7 @@ void display_player(int mode)
                                        sprintf(statmsg, "...You %s after the winning.", streq(p_ptr->died_from, "Seppuku") ? "did Seppuku" : "retired from the adventure");
 #endif
                                }
-                               else if (!dun_level)
+                               else if (!current_floor_ptr->dun_level)
                                {
 #ifdef JP
                                        sprintf(statmsg, "…あなたは%sで%sに殺された。", map_name(), p_ptr->died_from);
@@ -3954,15 +3965,15 @@ void display_player(int mode)
                                else
                                {
 #ifdef JP
-                                       sprintf(statmsg, "…あなたは、%sの%d階で%sに殺された。", map_name(), (int)dun_level, p_ptr->died_from);
+                                       sprintf(statmsg, "…あなたは、%sの%d階で%sに殺された。", map_name(), (int)current_floor_ptr->dun_level, p_ptr->died_from);
 #else
-                                       sprintf(statmsg, "...You were killed by %s on level %d of %s.", p_ptr->died_from, dun_level, map_name());
+                                       sprintf(statmsg, "...You were killed by %s on level %d of %s.", p_ptr->died_from, current_floor_ptr->dun_level, map_name());
 #endif
                                }
                        }
                        else if (character_dungeon)
                        {
-                               if (!dun_level)
+                               if (!current_floor_ptr->dun_level)
                                {
                                        sprintf(statmsg, _("…あなたは現在、 %s にいる。", "...Now, you are in %s."), map_name());
                                }
@@ -3986,9 +3997,9 @@ void display_player(int mode)
                                else
                                {
 #ifdef JP
-                                       sprintf(statmsg, "…あなたは現在、 %s の %d 階で探索している。", map_name(), (int)dun_level);
+                                       sprintf(statmsg, "…あなたは現在、 %s の %d 階で探索している。", map_name(), (int)current_floor_ptr->dun_level);
 #else
-                                       sprintf(statmsg, "...Now, you are exploring level %d of %s.", dun_level, map_name());
+                                       sprintf(statmsg, "...Now, you are exploring level %d of %s.", current_floor_ptr->dun_level, map_name());
 #endif
                                }
                        }
@@ -4186,9 +4197,9 @@ static void dump_aux_pet(FILE *fff)
 
        for (i = m_max - 1; i >= 1; i--)
        {
-               monster_type *m_ptr = &m_list[i];
+               monster_type *m_ptr = &current_floor_ptr->m_list[i];
 
-               if (!m_ptr->r_idx) continue;
+               if (!monster_is_valid(m_ptr)) continue;
                if (!is_pet(m_ptr)) continue;
                pet_settings = TRUE;
                if (!m_ptr->nickname && (p_ptr->riding != i)) continue;
@@ -4451,9 +4462,7 @@ static void dump_aux_quest(FILE *fff)
 
        /* Sort by compete level */
        for (i = 1; i < max_q_idx; i++) quest_num[i] = i;
-       ang_sort_comp = ang_sort_comp_quest_num;
-       ang_sort_swap = ang_sort_swap_quest_num;
-       ang_sort(quest_num, &dummy, max_q_idx);
+       ang_sort(quest_num, &dummy, max_q_idx, ang_sort_comp_quest_num, ang_sort_swap_quest_num);
 
        /* Dump Quest Information */
        fputc('\n', fff);
@@ -4664,7 +4673,6 @@ static void dump_aux_monsters(FILE *fff)
                /* Ignore unused index */
                if (!r_ptr->name) continue;
 
-               /* Unique monsters */
                if (r_ptr->flags1 & RF1_UNIQUE)
                {
                        bool dead = (r_ptr->max_num == 0);
@@ -4676,8 +4684,6 @@ static void dump_aux_monsters(FILE *fff)
                                who[uniq_total++] = k;
                        }
                }
-
-               /* Normal monsters */
                else
                {
                        if (r_ptr->r_pkills > 0)
@@ -4713,13 +4719,8 @@ static void dump_aux_monsters(FILE *fff)
                fprintf(fff, "You have defeated %ld %s including %ld unique monster%s in total.\n", norm_total, norm_total == 1 ? "enemy" : "enemies", uniq_total, (uniq_total == 1 ? "" : "s"));
 #endif
 
-
-               /* Select the sort method */
-               ang_sort_comp = ang_sort_comp_hook;
-               ang_sort_swap = ang_sort_swap_hook;
-
                /* Sort the array by dungeon depth of monsters */
-               ang_sort(who, &why, uniq_total);
+               ang_sort(who, &why, uniq_total, ang_sort_comp_hook, ang_sort_swap_hook);
                fprintf(fff, _("\n《上位%ld体のユニーク・モンスター》\n", "\n< Unique monsters top %ld >\n"), MIN(uniq_total, 10));
 
                /* Print top 10 */
@@ -4895,10 +4896,10 @@ static void dump_aux_home_museum(FILE *fff)
        store_type  *st_ptr;
 
        /* Do we need it?? */
-       /* process_dungeon_file("w_info.txt", 0, 0, max_wild_y, max_wild_x); */
+       /* process_dungeon_file("w_info.txt", 0, 0, current_world_ptr->max_wild_y, current_world_ptr->max_wild_x); */
 
        /* Print the home */
-       st_ptr = &town[1].store[STORE_HOME];
+       st_ptr = &town_info[1].store[STORE_HOME];
 
        /* Home -- if anything there */
        if (st_ptr->stock_num)
@@ -4923,7 +4924,7 @@ static void dump_aux_home_museum(FILE *fff)
 
 
        /* Print the home */
-       st_ptr = &town[1].store[STORE_MUSEUM];
+       st_ptr = &town_info[1].store[STORE_MUSEUM];
 
        /* Home -- if anything there */
        if (st_ptr->stock_num)
@@ -5045,8 +5046,6 @@ errr file_character(concptr name)
        }
 
        (void)make_character_dump(fff);
-
-       /* Close it */
        my_fclose(fff);
 
 
@@ -5423,7 +5422,6 @@ bool show_file(bool show_version, concptr name, concptr what, int line, BIT_FLAG
                /* Re-open the file if needed */
                if (next > line)
                {
-                       /* Close it */
                        my_fclose(fff);
 
                        /* Hack -- Re-Open the file */
@@ -5702,8 +5700,6 @@ bool show_file(bool show_version, concptr name, concptr what, int line, BIT_FLAG
                        strcpy (xtmp, "");
 
                        if (!get_string(_("ファイル名: ", "File name: "), xtmp, 80)) continue;
-
-                       /* Close it */
                        my_fclose(fff);
 
                        /* Build the filename */
@@ -5727,8 +5723,6 @@ bool show_file(bool show_version, concptr name, concptr what, int line, BIT_FLAG
 
                        while (!my_fgets(fff, buff, sizeof(buff)))
                                my_fputs(ffp, buff, 80);
-
-                       /* Close it */
                        my_fclose(fff);
                        my_fclose(ffp);
 
@@ -5981,90 +5975,6 @@ void get_name(void)
 
 
 /*!
- * @brief 自殺するコマンドのメインルーチン
- * Hack -- commit suicide
- * @return なし
- * @details
- */
-void do_cmd_suicide(void)
-{
-       int i;
-
-       /* Flush input */
-       flush();
-
-       /* Verify Retirement */
-       if (p_ptr->total_winner)
-       {
-               /* Verify */
-               if (!get_check_strict(_("引退しますか? ", "Do you want to retire? "), CHECK_NO_HISTORY)) return;
-       }
-
-       /* Verify Suicide */
-       else
-       {
-               /* Verify */
-               if (!get_check(_("本当に自殺しますか?", "Do you really want to commit suicide? "))) return;
-       }
-
-
-       if (!p_ptr->noscore)
-       {
-               /* Special Verification for suicide */
-               prt(_("確認のため '@' を押して下さい。", "Please verify SUICIDE by typing the '@' sign: "), 0, 0);
-
-               flush();
-               i = inkey();
-               prt("", 0, 0);
-               if (i != '@') return;
-
-               play_music(TERM_XTRA_MUSIC_BASIC, MUSIC_BASIC_GAMEOVER);
-       }
-
-       /* Initialize "last message" buffer */
-       if (p_ptr->last_message) string_free(p_ptr->last_message);
-       p_ptr->last_message = NULL;
-
-       /* Hack -- Note *winning* message */
-       if (p_ptr->total_winner && last_words)
-       {
-               char buf[1024] = "";
-               play_music(TERM_XTRA_MUSIC_BASIC, MUSIC_BASIC_WINNER);
-               do
-               {
-                       while (!get_string(_("*勝利*メッセージ: ", "*Winning* message: "), buf, sizeof buf)) ;
-               }
-               while (!get_check_strict(_("よろしいですか?", "Are you sure? "), CHECK_NO_HISTORY));
-
-               if (buf[0])
-               {
-                       p_ptr->last_message = string_make(buf);
-                       msg_print(p_ptr->last_message);
-               }
-       }
-
-       /* Stop playing */
-       p_ptr->playing = FALSE;
-
-       /* Kill the player */
-       p_ptr->is_dead = TRUE;
-
-       /* Leaving */
-       p_ptr->leaving = TRUE;
-
-       if (!p_ptr->total_winner)
-       {
-               do_cmd_write_nikki(NIKKI_BUNSHOU, 0, _("ダンジョンの探索に絶望して自殺した。", "give up all hope to commit suicide."));
-               do_cmd_write_nikki(NIKKI_GAMESTART, 1, _("-------- ゲームオーバー --------", "--------   Game  Over   --------"));
-               do_cmd_write_nikki(NIKKI_BUNSHOU, 1, "\n\n\n\n");
-       }
-
-       /* Cause of death */
-       (void)strcpy(p_ptr->died_from, _("途中終了", "Quitting"));
-}
-
-
-/*!
  * @brief セーブするコマンドのメインルーチン
  * Save the game
  * @param is_autosave オートセーブ中の処理ならばTRUE
@@ -6139,77 +6049,11 @@ void do_cmd_save_game(int is_autosave)
 void do_cmd_save_and_exit(void)
 {
        p_ptr->playing = FALSE;
-
-       /* Leaving */
        p_ptr->leaving = TRUE;
        do_cmd_write_nikki(NIKKI_GAMESTART, 0, _("----ゲーム中断----", "---- Save and Exit Game ----"));
 }
 
 
-/*!
- * @brief スコアを計算する /
- * Hack -- Calculates the total number of points earned                -JWT-
- * @return なし
- * @details
- */
-long total_points(void)
-{
-       int i, mult = 100;
-       DEPTH max_dl = 0;
-       u32b point, point_h, point_l;
-       int arena_win = MIN(p_ptr->arena_number, MAX_ARENA_MONS);
-
-       if (!preserve_mode) mult += 10;
-       if (!autoroller) mult += 10;
-       if (!smart_learn) mult -= 20;
-       if (smart_cheat) mult += 30;
-       if (ironman_shops) mult += 50;
-       if (ironman_small_levels) mult += 10;
-       if (ironman_empty_levels) mult += 20;
-       if (!powerup_home) mult += 50;
-       if (ironman_rooms) mult += 100;
-       if (ironman_nightmare) mult += 100;
-
-       if (mult < 5) mult = 5;
-
-       for (i = 0; i < max_d_idx; i++)
-               if(max_dlv[i] > max_dl)
-                       max_dl = max_dlv[i];
-
-       point_l = (p_ptr->max_max_exp + (100 * max_dl));
-       point_h = point_l / 0x10000L;
-       point_l = point_l % 0x10000L;
-       point_h *= mult;
-       point_l *= mult;
-       point_h += point_l / 0x10000L;
-       point_l %= 0x10000L;
-
-       point_l += ((point_h % 100) << 16);
-       point_h /= 100;
-       point_l /= 100;
-
-       point = (point_h << 16) + (point_l);
-       if (p_ptr->arena_number >= 0)
-               point += (arena_win * arena_win * (arena_win > 29 ? 1000 : 100));
-
-       if (ironman_downward) point *= 2;
-       if (p_ptr->pclass == CLASS_BERSERKER)
-       {
-               if ( p_ptr->prace == RACE_SPECTRE )
-                       point = point / 5;
-       }
-
-       if ((p_ptr->pseikaku == SEIKAKU_MUNCHKIN) && point)
-       {
-               point = 1;
-               if (p_ptr->total_winner) point = 2;
-       }
-       if (easy_band) point = (0 - point);
-
-       return point;
-}
-
-
 #define GRAVE_LINE_WIDTH 31
 
 /*!
@@ -6255,12 +6099,12 @@ static void make_bones(void)
        if (!(p_ptr->noscore & 0x00FF))
        {
                /* Ignore people who die in town */
-               if (dun_level)
+               if (current_floor_ptr->dun_level)
                {
                        char tmp[128];
 
                        /* "Bones" name */
-                       sprintf(tmp, "bone.%03d", dun_level);
+                       sprintf(tmp, "bone.%03d", current_floor_ptr->dun_level);
 
                        /* Build the filename */
                        path_build(str, sizeof(str), ANGBAND_DIR_BONE, tmp);
@@ -6314,7 +6158,7 @@ bool (*tombstone_aux)(void) = NULL;
  * Display a "tomb-stone"
  * @return なし
  */
-static void print_tomb(void)
+void print_tomb(void)
 {
        bool done = FALSE;
 
@@ -6463,7 +6307,7 @@ static void print_tomb(void)
 
                if (!streq(p_ptr->died_from, "ripe") && !streq(p_ptr->died_from, "Seppuku"))
                {
-                       if (dun_level == 0)
+                       if (current_floor_ptr->dun_level == 0)
                        {
                                concptr field_name = p_ptr->town_num ? "街" : "荒野";
                                if (streq(p_ptr->died_from, "途中終了"))
@@ -6479,18 +6323,18 @@ static void print_tomb(void)
                        {
                                if (streq(p_ptr->died_from, "途中終了"))
                                {
-                                       sprintf(tmp, "地下 %d 階で死んだ", (int)dun_level);
+                                       sprintf(tmp, "地下 %d 階で死んだ", (int)current_floor_ptr->dun_level);
                                }
                                else
                                {
-                                       sprintf(tmp, "に地下 %d 階で殺された", (int)dun_level);
+                                       sprintf(tmp, "に地下 %d 階で殺された", (int)current_floor_ptr->dun_level);
                                }
                        }
                        center_string(buf, tmp);
                        put_str(buf, 15 + extra_line, 11);
                }
 #else
-               (void)sprintf(tmp, "Killed on Level %d", dun_level);
+               (void)sprintf(tmp, "Killed on Level %d", current_floor_ptr->dun_level);
                center_string(buf, tmp);
                put_str(buf, 14, 11);
 
@@ -6524,18 +6368,16 @@ static void print_tomb(void)
  * Display some character info
  * @return なし
  */
-static void show_info(void)
+void show_info(void)
 {
        int             i, j, k, l;
-       object_type             *o_ptr;
+       object_type *o_ptr;
        store_type              *st_ptr;
 
        /* Hack -- Know everything in the inven/equip */
        for (i = 0; i < INVEN_TOTAL; i++)
        {
                o_ptr = &inventory[i];
-
-               /* Skip non-objects */
                if (!o_ptr->k_idx) continue;
 
                /* Aware and Known */
@@ -6545,14 +6387,12 @@ static void show_info(void)
 
        for (i = 1; i < max_towns; i++)
        {
-               st_ptr = &town[i].store[STORE_HOME];
+               st_ptr = &town_info[i].store[STORE_HOME];
 
                /* Hack -- Know everything in the home */
                for (j = 0; j < st_ptr->stock_num; j++)
                {
                        o_ptr = &st_ptr->stock[j];
-
-                       /* Skip non-objects */
                        if (!o_ptr->k_idx) continue;
 
                        /* Aware and Known */
@@ -6633,7 +6473,7 @@ static void show_info(void)
        /* Homes in the different towns */
        for (l = 1; l < max_towns; l++)
        {
-               st_ptr = &town[l].store[STORE_HOME];
+               st_ptr = &town_info[l].store[STORE_HOME];
 
                /* Home -- if anything there */
                if (st_ptr->stock_num)
@@ -6676,7 +6516,7 @@ static void show_info(void)
  * Display some character info
  * @return なし
  */
-static bool check_score(void)
+bool check_score(void)
 {
        Term_clear();
 
@@ -6736,125 +6576,6 @@ static bool check_score(void)
        return TRUE;
 }
 
-/*!
- * @brief ゲーム終了処理 /
- * Close up the current game (player may or may not be dead)
- * @return なし
- * @details
- * <pre>
- * This function is called only from "main.c" and "signals.c".
- * </pre>
- */
-void close_game(void)
-{
-       char buf[1024];
-       bool do_send = TRUE;
-
-/*     concptr p = "[i:キャラクタの情報, f:ファイル書き出し, t:スコア, x:*鑑定*, ESC:ゲーム終了]"; */
-       handle_stuff();
-
-       /* Flush the messages */
-       msg_print(NULL);
-
-       /* Flush the input */
-       flush();
-
-
-       /* No suspending now */
-       signals_ignore_tstp();
-
-
-       /* Hack -- Character is now "icky" */
-       character_icky = TRUE;
-
-
-       /* Build the filename */
-       path_build(buf, sizeof(buf), ANGBAND_DIR_APEX, "scores.raw");
-
-       /* Grab permissions */
-       safe_setuid_grab();
-
-       /* Open the high score file, for reading/writing */
-       highscore_fd = fd_open(buf, O_RDWR);
-
-       /* Drop permissions */
-       safe_setuid_drop();
-
-       /* Handle death */
-       if (p_ptr->is_dead)
-       {
-               /* Handle retirement */
-               if (p_ptr->total_winner) kingly();
-
-               /* Save memories */
-               if (!cheat_save || get_check(_("死んだデータをセーブしますか? ", "Save death? ")))
-               {
-                       if (!save_player()) msg_print(_("セーブ失敗!", "death save failed!"));
-               }
-               else do_send = FALSE;
-
-               /* You are dead */
-               print_tomb();
-
-               flush();
-
-               /* Show more info */
-               show_info();
-               Term_clear();
-
-               if (check_score())
-               {
-                       if ((!send_world_score(do_send)))
-                       {
-                               if (get_check_strict(_("後でスコアを登録するために待機しますか?", "Stand by for later score registration? "),
-                                                               (CHECK_NO_ESCAPE | CHECK_NO_HISTORY)))
-                               {
-                                       p_ptr->wait_report_score = TRUE;
-                                       p_ptr->is_dead = FALSE;
-                                       if (!save_player()) msg_print(_("セーブ失敗!", "death save failed!"));
-                               }
-                       }
-                       if (!p_ptr->wait_report_score)
-                               (void)top_twenty();
-               }
-               else if (highscore_fd >= 0)
-               {
-                       display_scores_aux(0, 10, -1, NULL);
-               }
-#if 0
-               /* Dump bones file */
-               make_bones();
-#endif
-       }
-
-       /* Still alive */
-       else
-       {
-               /* Save the game */
-               do_cmd_save_game(FALSE);
-
-               /* Prompt for scores */
-               prt(_("リターンキーか ESC キーを押して下さい。", "Press Return (or Escape)."), 0, 40);
-               play_music(TERM_XTRA_MUSIC_BASIC, MUSIC_BASIC_EXIT);
-
-               /* Predict score (or ESCAPE) */
-               if (inkey() != ESCAPE) predict_score();
-       }
-
-
-       /* Shut the high score file */
-       (void)fd_close(highscore_fd);
-
-       /* Forget the high score fd */
-       highscore_fd = -1;
-
-       /* Kill all temporal files */
-       clear_saved_floor_files();
-
-       /* Allow suspending now */
-       signals_handle_tstp();
-}
-
 
 /*!
  * @brief 異常発生時のゲーム緊急終了処理 /
@@ -6879,7 +6600,7 @@ void exit_game_panic(void)
        /* Clear the top line */
        prt("", 0, 0);
 
-       /* Hack -- turn off some things */
+       /* Hack -- current_world_ptr->game_turn off some things */
        disturb(TRUE, TRUE);
 
        /* Mega-Hack -- Delay death */
@@ -7330,8 +7051,6 @@ static void handle_signal_simple(int sig)
 
                /* Suicide */
                p_ptr->is_dead = TRUE;
-
-               /* Leaving */
                p_ptr->leaving = TRUE;
 
                /* Close stuff */