diff options
author | Bardur Arantsson <bardur@scientician.net> | 2015-12-11 08:09:30 +0100 |
---|---|---|
committer | Bardur Arantsson <bardur@scientician.net> | 2015-12-11 08:09:30 +0100 |
commit | 00be445e9127922933dae91a3d68660a57f53c5b (patch) | |
tree | a9ce274cb7cdba65e81994e719a8a40a8057d38e /src/melee1.cc | |
parent | f88c896138589fd2328002a7a4f097c582f79f9b (diff) |
Refactor race_info_idx() to avoid "invisible" static pointers
Diffstat (limited to 'src/melee1.cc')
-rw-r--r-- | src/melee1.cc | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/melee1.cc b/src/melee1.cc index 4eabe223..9ec5f0c6 100644 --- a/src/melee1.cc +++ b/src/melee1.cc @@ -1349,8 +1349,6 @@ bool_ make_attack_normal(int m_idx, byte divis) { monster_type *m_ptr = &m_list[m_idx]; - monster_race *r_ptr = race_inf(m_ptr); - int ap_cnt; int i, j, k, tmp, ac, rlev; @@ -1370,7 +1368,8 @@ bool_ make_attack_normal(int m_idx, byte divis) bool_ touched = FALSE, fear = FALSE, alive = TRUE; bool_ explode = FALSE; - /* Not allowed to attack */ + /* Not allowed to attack? */ + auto r_ptr = m_ptr->race(); if (r_ptr->flags1 & (RF1_NEVER_BLOW)) return (FALSE); /* ...nor if friendly */ |