return result;
}
-void have_esp_animal(player_type *creature_ptr)
+BIT_FLAGS have_esp_animal(player_type *creature_ptr)
{
object_type *o_ptr;
BIT_FLAGS flgs[TR_FLAG_SIZE];
-
- creature_ptr->esp_animal = FALSE;
+ BIT_FLAGS result = 0L;
for (inventory_slot_type i = INVEN_RARM; i < INVEN_TOTAL; i++) {
o_ptr = &creature_ptr->inventory_list[i];
object_flags(creature_ptr, o_ptr, flgs);
if (have_flag(flgs, TR_ESP_ANIMAL))
- creature_ptr->esp_animal = TRUE;
+ result |= 0x01 << (i - INVEN_RARM);
}
+
+ return result;
}
void have_esp_undead(player_type *creature_ptr)
bool have_kill_wall(player_type *creature_ptr);
BIT_FLAGS have_xtra_might(player_type *creature_ptr);
BIT_FLAGS have_esp_evil(player_type *creature_ptr);
-void have_esp_animal(player_type *creature_ptr);
+BIT_FLAGS have_esp_animal(player_type *creature_ptr);
void have_esp_undead(player_type *creature_ptr);
void have_esp_demon(player_type *creature_ptr);
void have_esp_orc(player_type *creature_ptr);
/* Save the old vision stuff */
bool old_telepathy = creature_ptr->telepathy;
- bool old_esp_animal = creature_ptr->esp_animal;
+ BIT_FLAGS old_esp_animal = creature_ptr->esp_animal;
bool old_esp_undead = creature_ptr->esp_undead;
bool old_esp_demon = creature_ptr->esp_demon;
bool old_esp_orc = creature_ptr->esp_orc;
creature_ptr->kill_wall = have_kill_wall(creature_ptr);
creature_ptr->xtra_might = have_xtra_might(creature_ptr);
creature_ptr->esp_evil = have_esp_evil(creature_ptr);
- have_esp_animal(creature_ptr);
+ creature_ptr->esp_animal = have_esp_animal(creature_ptr);
have_esp_undead(creature_ptr);
have_esp_demon(creature_ptr);
have_esp_orc(creature_ptr);
bool hold_exp; /* Resist exp draining */
bool telepathy; /* Telepathy */
- bool esp_animal;
+ BIT_FLAGS esp_animal;
bool esp_undead;
bool esp_demon;
bool esp_orc;