OSDN Git Service

生い立ち設定ファイル中で初期オプションを変更でき, 微妙なスコア操作
authornothere <nothere@0568b783-4c39-0410-ac80-bf13821ea2a2>
Sat, 27 Sep 2003 11:18:55 +0000 (11:18 +0000)
committernothere <nothere@0568b783-4c39-0410-ac80-bf13821ea2a2>
Sat, 27 Sep 2003 11:18:55 +0000 (11:18 +0000)
(オートローラーを使った後でオートローラーを切ってスコアを上げるなど)
が使えていたので, 生い立ち設定ファイル中では初期オプションを変更でき
ないように変更.

src/files.c

index 4dc06f3..198ceae 100644 (file)
@@ -583,7 +583,7 @@ errr process_pref_file_command(char *buf)
                                int os = option_info[i].o_set;
                                int ob = option_info[i].o_bit;
 
-                               if (p_ptr->playing && 6 == option_info[i].o_page && !p_ptr->wizard)
+                               if ((p_ptr->playing || character_xtra) && 6 == option_info[i].o_page && !p_ptr->wizard)
                                {
 #ifdef JP
                                        msg_format("½é´ü¥ª¥×¥·¥ç¥ó¤ÏÊѹ¹¤Ç¤­¤Þ¤»¤ó! '%s'", buf);
@@ -6964,14 +6964,19 @@ errr process_pickpref_file(cptr name)
 errr process_histpref_file(cptr name)
 {
        char buf[1024];
-
        errr err = 0;
+       bool old_character_xtra = character_xtra;
 
        /* Build the filename */
        path_build(buf, sizeof(buf), ANGBAND_DIR_USER, name);
 
+       /* Hack -- prevent modification birth options in this file */
+       character_xtra = TRUE;
+
        err = process_pref_file_aux(buf, PREF_TYPE_HISTPREF);
 
+       character_xtra = old_character_xtra;
+
        /* Result */
        return (err);
 }