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.4 by root, Tue Aug 29 08:01:37 2006 UTC vs.
Revision 1.5 by root, Wed Aug 30 06:06:27 2006 UTC

1/* 1/*
2 * static char *rcsid_monster_c = 2 * static char *rcsid_monster_c =
3 * "$Id: monster.C,v 1.4 2006/08/29 08:01:37 root Exp $"; 3 * "$Id: monster.C,v 1.5 2006/08/30 06:06:27 root Exp $";
4 */ 4 */
5 5
6/* 6/*
7 CrossFire, A Multiplayer game for X-windows 7 CrossFire, A Multiplayer game for X-windows
8 8
363 */ 363 */
364 if(QUERY_FLAG(op, FLAG_SCARED) &&!(RANDOM()%20)) { 364 if(QUERY_FLAG(op, FLAG_SCARED) &&!(RANDOM()%20)) {
365 CLEAR_FLAG(op,FLAG_SCARED); /* Time to regain some "guts"... */ 365 CLEAR_FLAG(op,FLAG_SCARED); /* Time to regain some "guts"... */
366 } 366 }
367 367
368 if (INVOKE_OBJECT (MOVE, op, ARG_OBJECT (op->enemy)))//TODO: should go away 368 if (INVOKE_OBJECT (MONSTER_MOVE, op, ARG_OBJECT (op->enemy)))
369 return 0; 369 return QUERY_FLAG (op, FLAG_FREED);
370 370
371 if ( QUERY_FLAG(op, FLAG_SLEEP) || QUERY_FLAG(op, FLAG_BLIND) || 371 if ( QUERY_FLAG(op, FLAG_SLEEP) || QUERY_FLAG(op, FLAG_BLIND) ||
372 ((op->map->darkness>0) && !QUERY_FLAG(op,FLAG_SEE_IN_DARK) && 372 ((op->map->darkness>0) && !QUERY_FLAG(op,FLAG_SEE_IN_DARK) &&
373 !QUERY_FLAG(op,FLAG_SEE_INVISIBLE))) { 373 !QUERY_FLAG(op,FLAG_SEE_INVISIBLE))) {
374 if(!check_wakeup(op,enemy,&rv)) 374 if(!check_wakeup(op,enemy,&rv))
453 * arch set uses it. 453 * arch set uses it.
454 */ 454 */
455 if ( (op->race != NULL)&& strcmp(op->race,"doppleganger") == 0) 455 if ( (op->race != NULL)&& strcmp(op->race,"doppleganger") == 0)
456 { 456 {
457 op->face = enemy->face; 457 op->face = enemy->face;
458 if (op->name) 458 if (op->name)
459 free_string(op->name); 459 free_string(op->name);
460 add_refcount(op->name = enemy->name); 460 add_refcount(op->name = enemy->name);
461 } 461 }
462 462
463 /* Calculate range information for closest body part - this 463 /* Calculate range information for closest body part - this
464 * is used for the 'skill' code, which isn't that smart when 464 * is used for the 'skill' code, which isn't that smart when
648 free_object(op); 648 free_object(op);
649 return 1; 649 return 1;
650 } 650 }
651 return 0; 651 return 0;
652} 652}
653
653int can_hit(object *ob1,object *ob2, rv_vector *rv) { 654int can_hit(object *ob1,object *ob2, rv_vector *rv) {
654 object *more; 655 object *more;
655 rv_vector rv1; 656 rv_vector rv1;
656 657
657 if(QUERY_FLAG(ob1,FLAG_CONFUSED)&&!(RANDOM()%3)) 658 if(QUERY_FLAG(ob1,FLAG_CONFUSED)&&!(RANDOM()%3))

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines