OSDN Git Service

[Refactor] #38997 set_action() に player_type * 引数を追加.
authordeskull <deskull@users.sourceforge.jp>
Sat, 29 Jun 2019 10:07:10 +0000 (19:07 +0900)
committerdeskull <deskull@users.sourceforge.jp>
Sat, 29 Jun 2019 10:07:10 +0000 (19:07 +0900)
24 files changed:
src/cmd-activate.c
src/cmd-basic.c
src/cmd-eat.c
src/cmd-hissatsu.c
src/cmd-item.c
src/cmd-pet.c
src/cmd-quaff.c
src/cmd-read.c
src/cmd-spell.c
src/cmd-usestaff.c
src/cmd-zaprod.c
src/cmd-zapwand.c
src/core.c
src/melee1.c
src/player-effects.c
src/player-effects.h
src/player-move.c
src/player-status.c
src/racial.c
src/realm-hex.c
src/realm-song.c
src/spells-status.c
src/spells2.c
src/wild.c

index 1ce82e3..d5367ac 100644 (file)
@@ -640,7 +640,7 @@ void do_cmd_activate(player_type *user_ptr)
 
        if (user_ptr->special_defense & (KATA_MUSOU | KATA_KOUKIJIN))
        {
-               set_action(ACTION_NONE);
+               set_action(p_ptr, ACTION_NONE);
        }
 
        item_tester_hook = item_tester_hook_activate;
index 7a71294..0997e45 100644 (file)
@@ -195,7 +195,7 @@ void do_cmd_go_up(player_type *creature_ptr)
 
        if (creature_ptr->special_defense & KATA_MUSOU)
        {
-               set_action(ACTION_NONE);
+               set_action(p_ptr, ACTION_NONE);
        }
 
        /* Verify stairs */
@@ -333,7 +333,7 @@ void do_cmd_go_down(player_type *creature_ptr)
 
        if (creature_ptr->special_defense & KATA_MUSOU)
        {
-               set_action(ACTION_NONE);
+               set_action(p_ptr, ACTION_NONE);
        }
 
        /* Verify stairs */
@@ -830,7 +830,7 @@ void do_cmd_open(player_type *creature_ptr)
 
        if (creature_ptr->special_defense & KATA_MUSOU)
        {
-               set_action(ACTION_NONE);
+               set_action(p_ptr, ACTION_NONE);
        }
 
        /* Option: Pick a direction */
@@ -974,7 +974,7 @@ void do_cmd_close(void)
 
        if (p_ptr->special_defense & KATA_MUSOU)
        {
-               set_action(ACTION_NONE);
+               set_action(p_ptr, ACTION_NONE);
        }
 
        /* Option: Pick a direction */
@@ -1219,7 +1219,7 @@ void do_cmd_tunnel(void)
 
        if (p_ptr->special_defense & KATA_MUSOU)
        {
-               set_action(ACTION_NONE);
+               set_action(p_ptr, ACTION_NONE);
        }
 
        /* Allow repeated command */
@@ -1552,7 +1552,7 @@ void do_cmd_disarm(void)
 
        if (p_ptr->special_defense & KATA_MUSOU)
        {
-               set_action(ACTION_NONE);
+               set_action(p_ptr, ACTION_NONE);
        }
 
        /* Option: Pick a direction */
@@ -1752,7 +1752,7 @@ void do_cmd_bash(void)
 
        if (p_ptr->special_defense & KATA_MUSOU)
        {
-               set_action(ACTION_NONE);
+               set_action(p_ptr, ACTION_NONE);
        }
 
        /* Allow repeated command */
@@ -1834,7 +1834,7 @@ void do_cmd_alter(void)
 
        if (p_ptr->special_defense & KATA_MUSOU)
        {
-               set_action(ACTION_NONE);
+               set_action(p_ptr, ACTION_NONE);
        }
 
        /* Allow repeated command */
@@ -1964,7 +1964,7 @@ void do_cmd_spike(void)
 
        if (p_ptr->special_defense & KATA_MUSOU)
        {
-               set_action(ACTION_NONE);
+               set_action(p_ptr, ACTION_NONE);
        }
 
        /* Get a "repeated" direction */
@@ -2055,7 +2055,7 @@ void do_cmd_walk(bool pickup)
 
                if ((dir != 5) && (p_ptr->special_defense & KATA_MUSOU))
                {
-                       set_action(ACTION_NONE);
+                       set_action(p_ptr, ACTION_NONE);
                }
 
                /* Hack -- In small scale wilderness it takes MUCH more time to move */
@@ -2108,7 +2108,7 @@ void do_cmd_run(void)
 
        if (p_ptr->special_defense & KATA_MUSOU)
        {
-               set_action(ACTION_NONE);
+               set_action(p_ptr, ACTION_NONE);
        }
 
        /* Get a "repeated" direction */
@@ -2160,7 +2160,7 @@ void do_cmd_stay(bool pickup)
 void do_cmd_rest(void)
 {
 
-       set_action(ACTION_NONE);
+       set_action(p_ptr, ACTION_NONE);
 
        if ((p_ptr->pclass == CLASS_BARD) && (SINGING_SONG_EFFECT(p_ptr) || INTERUPTING_SONG_EFFECT(p_ptr)))
        {
@@ -2282,7 +2282,7 @@ void do_cmd_fire(SPELL_IDX snipe_type)
 
        if (p_ptr->special_defense & KATA_MUSOU)
        {
-               set_action(ACTION_NONE);
+               set_action(p_ptr, ACTION_NONE);
        }
 
        q = _("どれを撃ちますか? ", "Fire which item? ");
@@ -2364,7 +2364,7 @@ bool do_cmd_throw(int mult, bool boomerang, OBJECT_IDX shuriken)
 
        if (p_ptr->special_defense & KATA_MUSOU)
        {
-               set_action(ACTION_NONE);
+               set_action(p_ptr, ACTION_NONE);
        }
 
        if (shuriken >= 0)
index 419e71b..1afe7eb 100644 (file)
@@ -512,7 +512,7 @@ void do_cmd_eat_food(void)
 
        if (p_ptr->special_defense & (KATA_MUSOU | KATA_KOUKIJIN))
        {
-               set_action(ACTION_NONE);
+               set_action(p_ptr, ACTION_NONE);
        }
 
        /* Restrict choices to food */
index 7998898..cc51db0 100644 (file)
@@ -333,7 +333,7 @@ void do_cmd_hissatsu(void)
 
        if (p_ptr->special_defense & KATA_MASK)
        {
-               set_action(ACTION_NONE);
+               set_action(p_ptr, ACTION_NONE);
        }
 
        if (!get_hissatsu_power(&n)) return;
@@ -382,7 +382,7 @@ void do_cmd_gain_hissatsu(void)
 
        if (p_ptr->special_defense & (KATA_MUSOU | KATA_KOUKIJIN))
        {
-               set_action(ACTION_NONE);
+               set_action(p_ptr, ACTION_NONE);
        }
 
        if (p_ptr->blind || no_lite())
index 9ad4c4b..f36e053 100644 (file)
@@ -181,7 +181,7 @@ void do_cmd_wield(void)
 
        if (p_ptr->special_defense & KATA_MUSOU)
        {
-               set_action(ACTION_NONE);
+               set_action(p_ptr, ACTION_NONE);
        }
 
        /* Restrict the choices */
@@ -531,7 +531,7 @@ void do_cmd_takeoff(void)
 
        if (p_ptr->special_defense & KATA_MUSOU)
        {
-               set_action(ACTION_NONE);
+               set_action(p_ptr, ACTION_NONE);
        }
 
        q = _("どれを装備からはずしますか? ", "Take off which item? ");
@@ -596,7 +596,7 @@ void do_cmd_drop(void)
 
        if (p_ptr->special_defense & KATA_MUSOU)
        {
-               set_action(ACTION_NONE);
+               set_action(p_ptr, ACTION_NONE);
        }
 
        q = _("どのアイテムを落としますか? ", "Drop which item? ");
@@ -656,7 +656,7 @@ void do_cmd_destroy(void)
 
        if (p_ptr->special_defense & KATA_MUSOU)
        {
-               set_action(ACTION_NONE);
+               set_action(p_ptr, ACTION_NONE);
        }
 
        /* Hack -- force destruction */
@@ -1100,7 +1100,7 @@ void do_cmd_refill(void)
 
        if (p_ptr->special_defense & KATA_MUSOU)
        {
-               set_action(ACTION_NONE);
+               set_action(p_ptr, ACTION_NONE);
        }
 
        /* It is nothing */
@@ -1529,7 +1529,7 @@ void do_cmd_use(void)
 
        if (p_ptr->special_defense & (KATA_MUSOU | KATA_KOUKIJIN))
        {
-               set_action(ACTION_NONE);
+               set_action(p_ptr, ACTION_NONE);
        }
 
        item_tester_hook = item_tester_hook_use;
index c493f4e..7863dc0 100644 (file)
@@ -285,7 +285,7 @@ bool do_riding(bool force)
        x = p_ptr->x + ddx[dir];
        g_ptr = &current_floor_ptr->grid_array[y][x];
 
-       if (p_ptr->special_defense & KATA_MUSOU) set_action(ACTION_NONE);
+       if (p_ptr->special_defense & KATA_MUSOU) set_action(p_ptr, ACTION_NONE);
 
        if (p_ptr->riding)
        {
@@ -369,7 +369,7 @@ bool do_riding(bool force)
                        msg_format(_("%sを起こした。", "You have waked %s up."), m_name);
                }
 
-               if (p_ptr->action == ACTION_KAMAE) set_action(ACTION_NONE);
+               if (p_ptr->action == ACTION_KAMAE) set_action(p_ptr, ACTION_NONE);
 
                p_ptr->riding = g_ptr->m_idx;
 
index 505bc80..2753d0c 100644 (file)
@@ -610,7 +610,7 @@ void do_cmd_quaff_potion(void)
 
        if (p_ptr->special_defense & (KATA_MUSOU | KATA_KOUKIJIN))
        {
-               set_action(ACTION_NONE);
+               set_action(p_ptr, ACTION_NONE);
        }
 
        /* Restrict choices to potions */
index bebd676..ac4a763 100644 (file)
@@ -632,7 +632,7 @@ void do_cmd_read_scroll(void)
 
        if (p_ptr->special_defense & (KATA_MUSOU | KATA_KOUKIJIN))
        {
-               set_action(ACTION_NONE);
+               set_action(p_ptr, ACTION_NONE);
        }
 
        if (cmd_limit_blind(p_ptr)) return;
index bd10624..9c87701 100644 (file)
@@ -651,7 +651,7 @@ void do_cmd_browse(void)
 
        if (p_ptr->special_defense & KATA_MUSOU)
        {
-               set_action(ACTION_NONE);
+               set_action(p_ptr, ACTION_NONE);
        }
 
        if (p_ptr->pclass == CLASS_FORCETRAINER)
@@ -829,7 +829,7 @@ void do_cmd_study(void)
 
        if (p_ptr->special_defense & KATA_MUSOU)
        {
-               set_action(ACTION_NONE);
+               set_action(p_ptr, ACTION_NONE);
        }
 
 #ifdef JP
index 64a340a..2ad7712 100644 (file)
@@ -440,7 +440,7 @@ void do_cmd_use_staff(void)
 
        if (p_ptr->special_defense & (KATA_MUSOU | KATA_KOUKIJIN))
        {
-               set_action(ACTION_NONE);
+               set_action(p_ptr, ACTION_NONE);
        }
 
        q = _("どの杖を使いますか? ", "Use which staff? ");
index b590d52..e0bc2c2 100644 (file)
@@ -412,7 +412,7 @@ void do_cmd_zap_rod(void)
 
        if (p_ptr->special_defense & (KATA_MUSOU | KATA_KOUKIJIN))
        {
-               set_action(ACTION_NONE);
+               set_action(p_ptr, ACTION_NONE);
        }
 
        q = _("どのロッドを振りますか? ", "Zap which rod? ");
index b1cde68..9139e3c 100644 (file)
@@ -463,7 +463,7 @@ void do_cmd_aim_wand(void)
        if (cmd_limit_arena(p_ptr)) return;
        if (p_ptr->special_defense & (KATA_MUSOU | KATA_KOUKIJIN))
        {
-               set_action(ACTION_NONE);
+               set_action(p_ptr, ACTION_NONE);
        }
 
        q = _("どの魔法棒で狙いますか? ", "Aim which wand? ");
index 5927c8e..1cc0799 100644 (file)
@@ -3715,8 +3715,8 @@ static void process_command(void)
                /* Toggle search mode */
                case 'S':
                {
-                       if (p_ptr->action == ACTION_SEARCH) set_action(ACTION_NONE);
-                       else set_action(ACTION_SEARCH);
+                       if (p_ptr->action == ACTION_SEARCH) set_action(p_ptr, ACTION_NONE);
+                       else set_action(p_ptr, ACTION_SEARCH);
                        break;
                }
 
@@ -4274,7 +4274,7 @@ static void process_command(void)
                        if (!p_ptr->wild_mode) do_cmd_travel();
                        if (p_ptr->special_defense & KATA_MUSOU)
                        {
-                               set_action(ACTION_NONE);
+                               set_action(p_ptr, ACTION_NONE);
                        }
                        break;
                }
@@ -4466,7 +4466,7 @@ static void process_player(void)
                        if ((p_ptr->chp == p_ptr->mhp) &&
                            (p_ptr->csp >= p_ptr->msp))
                        {
-                               set_action(ACTION_NONE);
+                               set_action(p_ptr, ACTION_NONE);
                        }
                }
 
@@ -4483,7 +4483,7 @@ static void process_player(void)
                            !p_ptr->image && !p_ptr->word_recall &&
                            !p_ptr->alter_reality)
                        {
-                               set_action(ACTION_NONE);
+                               set_action(p_ptr, ACTION_NONE);
                        }
                }
        }
@@ -4592,7 +4592,7 @@ static void process_player(void)
                        /* Mana run out */
                        p_ptr->csp = 0;
                        p_ptr->csp_frac = 0;
-                       set_action(ACTION_NONE);
+                       set_action(p_ptr, ACTION_NONE);
                }
                else
                {
@@ -4608,7 +4608,7 @@ static void process_player(void)
                {
                        if (p_ptr->csp < 3)
                        {
-                               set_action(ACTION_NONE);
+                               set_action(p_ptr, ACTION_NONE);
                        }
                        else
                        {
@@ -4671,7 +4671,7 @@ static void process_player(void)
                                /* Reduce rest count */
                                p_ptr->resting--;
 
-                               if (!p_ptr->resting) set_action(ACTION_NONE);
+                               if (!p_ptr->resting) set_action(p_ptr, ACTION_NONE);
                                p_ptr->redraw |= (PR_STATE);
                        }
 
index 59dcadb..db5575a 100644 (file)
@@ -2343,7 +2343,7 @@ bool py_attack(POSITION y, POSITION x, COMBAT_OPTION_IDX mode)
 
        if ((p_ptr->special_defense & KATA_IAI) && ((mode != HISSATSU_IAI) || mdeath))
        {
-               set_action(ACTION_NONE);
+               set_action(p_ptr, ACTION_NONE);
        }
 
        return mdeath;
@@ -4108,7 +4108,7 @@ bool make_attack_normal(MONSTER_IDX m_idx)
 
        if (p_ptr->special_defense & KATA_IAI)
        {
-               set_action(ACTION_NONE);
+               set_action(p_ptr, ACTION_NONE);
        }
 
        /* Assume we attacked */
index 1151b34..d839087 100644 (file)
@@ -99,9 +99,9 @@ const kamae kata_shurui[MAX_KATA] =
  * #ACTION_NONE / #ACTION_SEARCH / #ACTION_REST / #ACTION_LEARN / #ACTION_FISH / #ACTION_KAMAE / #ACTION_KATA / #ACTION_SING / #ACTION_HAYAGAKE / #ACTION_SPELL から選択。
  * @return なし
  */
-void set_action(ACTION_IDX typ)
+void set_action(player_type *creature_ptr, ACTION_IDX typ)
 {
-       int prev_typ = p_ptr->action;
+       int prev_typ = creature_ptr->action;
 
        if (typ == prev_typ)
        {
@@ -114,32 +114,32 @@ void set_action(ACTION_IDX typ)
                        case ACTION_SEARCH:
                        {
                                msg_print(_("探索をやめた。", "You no longer walk carefully."));
-                               p_ptr->redraw |= (PR_SPEED);
+                               creature_ptr->redraw |= (PR_SPEED);
                                break;
                        }
                        case ACTION_REST:
                        {
-                               p_ptr->resting = 0;
+                               creature_ptr->resting = 0;
                                break;
                        }
                        case ACTION_LEARN:
                        {
                                msg_print(_("学習をやめた。", "You stop Learning"));
-                               p_ptr->new_mane = FALSE;
+                               creature_ptr->new_mane = FALSE;
                                break;
                        }
                        case ACTION_KAMAE:
                        {
                                msg_print(_("構えをといた。", "You stop assuming the posture."));
-                               p_ptr->special_defense &= ~(KAMAE_MASK);
+                               creature_ptr->special_defense &= ~(KAMAE_MASK);
                                break;
                        }
                        case ACTION_KATA:
                        {
                                msg_print(_("型を崩した。", "You stop assuming the posture."));
-                               p_ptr->special_defense &= ~(KATA_MASK);
-                               p_ptr->update |= (PU_MONSTERS);
-                               p_ptr->redraw |= (PR_STATUS);
+                               creature_ptr->special_defense &= ~(KATA_MASK);
+                               creature_ptr->update |= (PU_MONSTERS);
+                               creature_ptr->redraw |= (PR_STATUS);
                                break;
                        }
                        case ACTION_SING:
@@ -150,7 +150,7 @@ void set_action(ACTION_IDX typ)
                        case ACTION_HAYAGAKE:
                        {
                                msg_print(_("足が重くなった。", "You are no longer walking extremely fast."));
-                               take_turn(p_ptr, 100);
+                               take_turn(creature_ptr, 100);
                                break;
                        }
                        case ACTION_SPELL:
@@ -161,18 +161,18 @@ void set_action(ACTION_IDX typ)
                }
        }
 
-       p_ptr->action = typ;
+       creature_ptr->action = typ;
 
        /* If we are requested other action, stop singing */
-       if (prev_typ == ACTION_SING) stop_singing(p_ptr);
+       if (prev_typ == ACTION_SING) stop_singing(creature_ptr);
        if (prev_typ == ACTION_SPELL) stop_hex_spell();
 
-       switch (p_ptr->action)
+       switch (creature_ptr->action)
        {
                case ACTION_SEARCH:
                {
                        msg_print(_("注意深く歩き始めた。", "You begin to walk carefully."));
-                       p_ptr->redraw |= (PR_SPEED);
+                       creature_ptr->redraw |= (PR_SPEED);
                        break;
                }
                case ACTION_LEARN:
@@ -195,8 +195,8 @@ void set_action(ACTION_IDX typ)
                        break;
                }
        }
-       p_ptr->update |= (PU_BONUS);
-       p_ptr->redraw |= (PR_STATE);
+       creature_ptr->update |= (PU_BONUS);
+       creature_ptr->redraw |= (PR_STATE);
 }
 
 /*!
index 0fab58a..a17f202 100644 (file)
@@ -11,7 +11,7 @@ struct kamae
 
 /* effects.c */
 
-extern void set_action(ACTION_IDX typ);
+extern void set_action(player_type *creature_ptr, ACTION_IDX typ);
 extern void reset_tim_flags(player_type *creature_ptr);
 extern void dispel_player(player_type *creature_ptr);
 extern bool set_mimic(player_type *creature_ptr, TIME_EFFECT v, IDX p, bool do_dec);
index 94e2be3..a93d151 100644 (file)
@@ -677,7 +677,7 @@ bool move_player_effect(POSITION ny, POSITION nx, BIT_FLAGS mpe_mode)
                     (!p_ptr->levitation && have_flag(f_ptr->flags, FF_DEEP))))
                {
                        msg_print(_("ここでは素早く動けない。", "You cannot run in here."));
-                       set_action(ACTION_NONE);
+                       set_action(p_ptr, ACTION_NONE);
                }
                if (p_ptr->prace == RACE_MERFOLK)
                {
@@ -2297,7 +2297,7 @@ void disturb(bool stop_search, bool stop_travel)
        if ((p_ptr->action == ACTION_REST) || (p_ptr->action == ACTION_FISH) || (stop_search && (p_ptr->action == ACTION_SEARCH)))
        {
                /* Cancel */
-               set_action(ACTION_NONE);
+               set_action(p_ptr, ACTION_NONE);
        }
 
        /* Cancel running */
index 255b28a..7c1c321 100644 (file)
@@ -1615,7 +1615,7 @@ void calc_bonuses(void)
        {
                if (!(empty_hands_status & EMPTY_HAND_RARM))
                {
-                       set_action(ACTION_NONE);
+                       set_action(p_ptr, ACTION_NONE);
                }
        }
 
index 6ede7c9..caed1cc 100644 (file)
@@ -78,7 +78,7 @@ static bool choose_kamae(void)
                {
                        if (p_ptr->action == ACTION_KAMAE)
                        {
-                               set_action(ACTION_NONE);
+                               set_action(p_ptr, ACTION_NONE);
                        }
                        else
                                msg_print(_("もともと構えていない。", "You are not assuming a posture."));
@@ -106,7 +106,7 @@ static bool choose_kamae(void)
                        break;
                }
        }
-       set_action(ACTION_KAMAE);
+       set_action(p_ptr, ACTION_KAMAE);
 
        if (p_ptr->special_defense & (KAMAE_GENBU << new_kamae))
        {
@@ -177,7 +177,7 @@ static bool choose_kata(void)
                {
                        if (p_ptr->action == ACTION_KATA)
                        {
-                               set_action(ACTION_NONE);
+                               set_action(p_ptr, ACTION_NONE);
                        }
                        else
                                msg_print(_("もともと構えていない。", "You are not assuming posture."));
@@ -205,7 +205,7 @@ static bool choose_kata(void)
                        break;
                }
        }
-       set_action(ACTION_KATA);
+       set_action(p_ptr, ACTION_KATA);
 
        if (p_ptr->special_defense & (KATA_IAI << new_kata))
        {
@@ -579,11 +579,11 @@ static bool cmd_racial_power_aux(s32b command)
                {
                        if (p_ptr->action == ACTION_LEARN)
                        {
-                               set_action(ACTION_NONE);
+                               set_action(p_ptr, ACTION_NONE);
                        }
                        else
                        {
-                               set_action(ACTION_LEARN);
+                               set_action(p_ptr, ACTION_LEARN);
                        }
                        free_turn(p_ptr);
                        break;
@@ -855,7 +855,7 @@ void do_cmd_racial_power(void)
 
        if (p_ptr->special_defense & (KATA_MUSOU | KATA_KOUKIJIN))
        {
-               set_action(ACTION_NONE);
+               set_action(p_ptr, ACTION_NONE);
        }
 
        switch (p_ptr->pclass)
index 124fbb2..d221ccd 100644 (file)
@@ -54,7 +54,7 @@ bool stop_hex_spell_all(void)
        CASTING_HEX_FLAGS(p_ptr) = 0;
        CASTING_HEX_NUM(p_ptr) = 0;
 
-       if (p_ptr->action == ACTION_SPELL) set_action(ACTION_NONE);
+       if (p_ptr->action == ACTION_SPELL) set_action(p_ptr, ACTION_NONE);
 
        p_ptr->update |= (PU_BONUS | PU_HP | PU_MANA | PU_SPELLS);
        p_ptr->redraw |= (PR_EXTRA | PR_HP | PR_MANA);
@@ -824,7 +824,7 @@ concptr do_hex_spell(SPELL_IDX spell, BIT_FLAGS mode)
                                do_spell(REALM_HEX, spell, SPELL_STOP);
                                CASTING_HEX_FLAGS(p_ptr) &= ~(1L << spell);
                                CASTING_HEX_NUM(p_ptr)--;
-                               if (!SINGING_SONG_ID(p_ptr)) set_action(ACTION_NONE);
+                               if (!SINGING_SONG_ID(p_ptr)) set_action(p_ptr, ACTION_NONE);
                        }
                }
                if (stop)
@@ -1122,7 +1122,7 @@ concptr do_hex_spell(SPELL_IDX spell, BIT_FLAGS mode)
                CASTING_HEX_FLAGS(p_ptr) |= 1L << (spell);
                CASTING_HEX_NUM(p_ptr)++;
 
-               if (p_ptr->action != ACTION_SPELL) set_action(ACTION_SPELL);
+               if (p_ptr->action != ACTION_SPELL) set_action(p_ptr, ACTION_SPELL);
        }
 
        if (!info)
index dc59f69..7520577 100644 (file)
@@ -27,7 +27,7 @@ static void start_singing(SPELL_IDX spell, MAGIC_NUM1 song)
 
 
        /* Now the player is singing */
-       set_action(ACTION_SING);
+       set_action(p_ptr, ACTION_SING);
 
        p_ptr->update |= (PU_BONUS);
        p_ptr->redraw |= (PR_STATUS);
index 0e482ce..e897d0c 100644 (file)
@@ -169,8 +169,8 @@ void stop_singing(player_type *creature_ptr)
        /* The player is singing? */
        if (!SINGING_SONG_EFFECT(creature_ptr)) return;
 
-       /* Hack -- if called from set_action(), avoid recursive loop */
-       if (creature_ptr->action == ACTION_SING) set_action(ACTION_NONE);
+       /* Hack -- if called from set_action(p_ptr, ), avoid recursive loop */
+       if (creature_ptr->action == ACTION_SING) set_action(p_ptr, ACTION_NONE);
 
        /* Message text of each song or etc. */
        do_spell(REALM_MUSIC, SINGING_SONG_ID(creature_ptr), SPELL_STOP);
@@ -426,7 +426,7 @@ bool fishing(player_type *creature_ptr)
                free_turn(creature_ptr);
                return FALSE;
        }
-       set_action(ACTION_FISH);
+       set_action(p_ptr, ACTION_FISH);
        creature_ptr->redraw |= (PR_STATE);
        return TRUE;
 }
index 81c71e6..3b86942 100644 (file)
@@ -4211,7 +4211,7 @@ void hayagake(player_type *creature_ptr)
 {
        if (creature_ptr->action == ACTION_HAYAGAKE)
        {
-               set_action(ACTION_NONE);
+               set_action(p_ptr, ACTION_NONE);
        }
        else
        {
@@ -4225,7 +4225,7 @@ void hayagake(player_type *creature_ptr)
                }
                else
                {
-                       set_action(ACTION_HAYAGAKE);
+                       set_action(p_ptr, ACTION_HAYAGAKE);
                }
        }
        creature_ptr->energy_use = 0;
index 564fdd8..d5b48c0 100644 (file)
@@ -1181,7 +1181,7 @@ bool change_wild_mode(bool encount)
        if (hex_spelling_any()) stop_hex_spell_all();
 
        /* Cancel any special action */
-       set_action(ACTION_NONE);
+       set_action(p_ptr, ACTION_NONE);
 
        /* Go into the global map */
        p_ptr->wild_mode = TRUE;