creature_ptr->esp_animal = TRUE;
}
}
+
+void have_esp_undead(player_type *creature_ptr)
+{
+ object_type *o_ptr;
+ BIT_FLAGS flgs[TR_FLAG_SIZE];
+
+ creature_ptr->esp_undead = FALSE;
+
+ for (int i = INVEN_RARM; i < INVEN_TOTAL; i++) {
+ o_ptr = &creature_ptr->inventory_list[i];
+ if (!o_ptr->k_idx)
+ continue;
+
+ object_flags(creature_ptr, o_ptr, flgs);
+
+ if (have_flag(flgs, TR_ESP_UNDEAD))
+ creature_ptr->esp_undead = TRUE;
+ }
+}
+
void have_xtra_might(player_type *creature_ptr);
void have_esp_evil(player_type *creature_ptr);
void have_esp_animal(player_type *creature_ptr);
+void have_esp_undead(player_type *creature_ptr);
creature_ptr->levitation = FALSE;
creature_ptr->hold_exp = FALSE;
creature_ptr->telepathy = FALSE;
- creature_ptr->esp_undead = FALSE;
creature_ptr->esp_demon = FALSE;
creature_ptr->esp_orc = FALSE;
creature_ptr->esp_troll = FALSE;
have_xtra_might(creature_ptr);
have_esp_evil(creature_ptr);
have_esp_animal(creature_ptr);
+ have_esp_undead(creature_ptr);
calc_race_status(creature_ptr);
creature_ptr->regenerate = TRUE;
if (have_flag(flgs, TR_TELEPATHY))
creature_ptr->telepathy = TRUE;
- if (have_flag(flgs, TR_ESP_UNDEAD))
- creature_ptr->esp_undead = TRUE;
if (have_flag(flgs, TR_ESP_DEMON))
creature_ptr->esp_demon = TRUE;
if (have_flag(flgs, TR_ESP_ORC))