… | |
… | |
85 | * target enemy - this code below makes sure the enemy is something |
85 | * target enemy - this code below makes sure the enemy is something |
86 | * that should be attacked. My guess is that the arrow hits |
86 | * that should be attacked. My guess is that the arrow hits |
87 | * the creature/owner, and so the creature then takes that |
87 | * the creature/owner, and so the creature then takes that |
88 | * as the enemy to attack. |
88 | * as the enemy to attack. |
89 | */ |
89 | */ |
90 | else if (!QUERY_FLAG (npc->enemy, FLAG_MONSTER) && |
90 | else if (!QUERY_FLAG (npc->enemy, FLAG_MONSTER) |
91 | !QUERY_FLAG (npc->enemy, FLAG_GENERATOR) && npc->enemy->type != PLAYER && npc->enemy->type != GOLEM) |
91 | && !QUERY_FLAG (npc->enemy, FLAG_GENERATOR) |
|
|
92 | && npc->enemy->type != PLAYER |
|
|
93 | && npc->enemy->type != GOLEM) |
92 | npc->enemy = NULL; |
94 | npc->enemy = NULL; |
93 | |
95 | |
94 | } |
96 | } |
95 | return can_detect_enemy (npc, npc->enemy, rv) ? npc->enemy : NULL; |
97 | return can_detect_enemy (npc, npc->enemy, rv) ? npc->enemy : NULL; |
96 | } |
98 | } |