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.24 by root, Thu Jan 18 21:27:19 2007 UTC vs.
Revision 1.26 by root, Tue Apr 24 12:32:16 2007 UTC

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}
446 } /* stand still */ 448 } /* stand still */
447 return 0; 449 return 0;
448 } /* no enemy */ 450 } /* no enemy */
449 451
450 /* We have an enemy. Block immediately below is for pets */ 452 /* We have an enemy. Block immediately below is for pets */
451 if ((op->attack_movement & HI4) == PETMOVE && (owner = op->owner) != NULL && !on_same_map (op, owner)) 453 if ((op->attack_movement & HI4) == PETMOVE
454 && (owner = op->owner) != NULL
455 && !on_same_map (op, owner)
456 && !owner->flag [FLAG_REMOVED])
452 return follow_owner (op, owner); 457 return follow_owner (op, owner);
453 458
454 /* doppleganger code to change monster facing to that of the nearest 459 /* doppleganger code to change monster facing to that of the nearest
455 * player. Hmm. The code is here, but no monster in the current 460 * player. Hmm. The code is here, but no monster in the current
456 * arch set uses it. 461 * arch set uses it.

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines