… | |
… | |
153 | * Currently, only move_monster calls this function. |
153 | * Currently, only move_monster calls this function. |
154 | * Fix function so that we always make calls to get_rangevector |
154 | * Fix function so that we always make calls to get_rangevector |
155 | * if we have a valid target - function as not doing so in |
155 | * if we have a valid target - function as not doing so in |
156 | * many cases. |
156 | * many cases. |
157 | */ |
157 | */ |
158 | object * |
158 | static object * |
159 | find_enemy (object *npc, rv_vector * rv) |
159 | find_enemy (object *npc, rv_vector * rv) |
160 | { |
160 | { |
161 | object *attacker, *tmp = NULL; |
161 | object *attacker, *tmp = NULL; |
162 | |
162 | |
163 | attacker = npc->attacked_by; /* save this for later use. This can be a attacker. */ |
163 | attacker = npc->attacked_by; /* save this for later use. This can be a attacker. */ |
… | |
… | |
231 | /* Sees if this monster should wake up. |
231 | /* Sees if this monster should wake up. |
232 | * Currently, this is only called from move_monster, and |
232 | * Currently, this is only called from move_monster, and |
233 | * if enemy is set, then so should be rv. |
233 | * if enemy is set, then so should be rv. |
234 | * returns 1 if the monster should wake up, 0 otherwise. |
234 | * returns 1 if the monster should wake up, 0 otherwise. |
235 | */ |
235 | */ |
236 | int |
236 | static int |
237 | check_wakeup (object *op, object *enemy, rv_vector *rv) |
237 | check_wakeup (object *op, object *enemy, rv_vector *rv) |
238 | { |
238 | { |
239 | /* Trim work - if no enemy, no need to do anything below */ |
239 | /* Trim work - if no enemy, no need to do anything below */ |
240 | if (!enemy) |
240 | if (!enemy) |
241 | return 0; |
241 | return 0; |