From: deskull Date: Thu, 30 May 2019 16:25:39 +0000 (+0900) Subject: [Refactor] #38844 reset_concentrate を player_type 構造体へ移動. X-Git-Tag: vmacos3.0.0-alpha52~3268 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=a47f4556899725659410b14d9766da3b5f2942c8;p=hengbandforosx%2Fhengbandosx.git [Refactor] #38844 reset_concentrate を player_type 構造体へ移動. --- diff --git a/src/core.c b/src/core.c index 6d55f805e..f90a42504 100644 --- a/src/core.c +++ b/src/core.c @@ -3523,7 +3523,7 @@ static void process_command(void) /* Sniper */ if ((p_ptr->pclass == CLASS_SNIPER) && (p_ptr->concent)) - reset_concent = TRUE; + p_ptr->reset_concent = TRUE; /* Parse the command */ switch (command_cmd) @@ -4896,7 +4896,7 @@ static void process_player(void) } /* Sniper */ - if (p_ptr->energy_use && reset_concent) reset_concentration(TRUE); + if (p_ptr->energy_use && p_ptr->reset_concent) reset_concentration(TRUE); /* Handle "leaving" */ if (p_ptr->leaving) break; diff --git a/src/externs.h b/src/externs.h index e879f250a..79204e68e 100644 --- a/src/externs.h +++ b/src/externs.h @@ -48,8 +48,6 @@ extern const byte adj_chr_chm[]; extern bool repair_monsters; extern bool repair_objects; -extern bool reset_concent; - /* diff --git a/src/player-status.h b/src/player-status.h index cd94b7434..3625d21d5 100644 --- a/src/player-status.h +++ b/src/player-status.h @@ -364,6 +364,8 @@ struct player_type bool now_damaged; bool ambush_flag; + bool reset_concent; /* Concentration reset flag */ + bool wizard; /* Player is in wizard mode */ MONSTER_IDX riding; /* Riding on a monster of this index */ diff --git a/src/snipe.c b/src/snipe.c index d0b58662a..73c7ac1f7 100644 --- a/src/snipe.c +++ b/src/snipe.c @@ -120,7 +120,7 @@ static bool snipe_concentrate(void) if ((int)p_ptr->concent < (2 + (p_ptr->lev + 5) / 10)) p_ptr->concent++; msg_format(_("集中した。(集中度 %d)", "You concentrate deeply. (lvl %d)"), p_ptr->concent); - reset_concent = FALSE; + p_ptr->reset_concent = FALSE; p_ptr->update |= (PU_BONUS | PU_MONSTERS); p_ptr->redraw |= (PR_STATUS); @@ -140,7 +140,7 @@ void reset_concentration(bool msg) } p_ptr->concent = 0; - reset_concent = FALSE; + p_ptr->reset_concent = FALSE; p_ptr->update |= (PU_BONUS | PU_MONSTERS); p_ptr->redraw |= (PR_STATUS); diff --git a/src/variable.c b/src/variable.c index 7772eacec..f22e18a9c 100644 --- a/src/variable.c +++ b/src/variable.c @@ -80,9 +80,3 @@ int server_port; /* for movie */ bool browsing_movie; - - -/* for snipers */ -bool reset_concent = FALSE; /* Concentration reset flag */ - -