ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/server/server/monster.C
(Generate patch)

Comparing deliantra/server/server/monster.C (file contents):
Revision 1.32 by root, Sat May 12 18:14:48 2007 UTC vs.
Revision 1.33 by root, Thu May 24 03:33:29 2007 UTC

145 } 145 }
146 146
147 return 0; 147 return 0;
148} 148}
149 149
150
151/* Tries to find an enmy for npc. We pass the range vector since 150/* Tries to find an enemy for npc. We pass the range vector since
152 * our caller will find the information useful. 151 * our caller will find the information useful.
153 * Currently, only move_monster calls this function. 152 * Currently, only move_monster calls this function.
154 * Fix function so that we always make calls to get_rangevector 153 * Fix function so that we always make calls to get_rangevector
155 * if we have a valid target - function as not doing so in 154 * if we have a valid target - function as not doing so in
156 * many cases. 155 * many cases.
157 */ 156 */
158
159object * 157object *
160find_enemy (object *npc, rv_vector * rv) 158find_enemy (object *npc, rv_vector * rv)
161{ 159{
162 object *attacker, *tmp = NULL; 160 object *attacker, *tmp = NULL;
163 161
231/* Sees if this monster should wake up. 229/* Sees if this monster should wake up.
232 * Currently, this is only called from move_monster, and 230 * Currently, this is only called from move_monster, and
233 * if enemy is set, then so should be rv. 231 * if enemy is set, then so should be rv.
234 * returns 1 if the monster should wake up, 0 otherwise. 232 * returns 1 if the monster should wake up, 0 otherwise.
235 */ 233 */
236
237int 234int
238check_wakeup (object *op, object *enemy, rv_vector * rv) 235check_wakeup (object *op, object *enemy, rv_vector * rv)
239{ 236{
240 int radius = op->stats.Wis > MIN_MON_RADIUS ? op->stats.Wis : MIN_MON_RADIUS; 237 int radius = op->stats.Wis > MIN_MON_RADIUS ? op->stats.Wis : MIN_MON_RADIUS;
241 238
289} 286}
290 287
291/* 288/*
292 * Move-monster returns 1 if the object has been freed, otherwise 0. 289 * Move-monster returns 1 if the object has been freed, otherwise 0.
293 */ 290 */
294
295int 291int
296move_monster (object *op) 292move_monster (object *op)
297{ 293{
298 int dir, diff, pre_att_dir; /* elmex: pre_att_dir remembers the direction before attack movement */ 294 int dir, diff, pre_att_dir; /* elmex: pre_att_dir remembers the direction before attack movement */
299 object *owner, *enemy, *part, *oph = op; 295 object *owner, *enemy, *part, *oph = op;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines