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

Comparing deliantra/server/server/attack.C (file contents):
Revision 1.75 by root, Mon Aug 27 05:10:51 2007 UTC vs.
Revision 1.78 by root, Mon Oct 22 03:11:46 2007 UTC

689 if (QUERY_FLAG (*target, FLAG_FREED) || QUERY_FLAG (*hitter, FLAG_FREED)) 689 if (QUERY_FLAG (*target, FLAG_FREED) || QUERY_FLAG (*hitter, FLAG_FREED))
690 { 690 {
691 LOG (llevError, "BUG: get_attack_mode(): freed object\n"); 691 LOG (llevError, "BUG: get_attack_mode(): freed object\n");
692 return 1; 692 return 1;
693 } 693 }
694
694 if ((*target)->head) 695 if ((*target)->head)
695 *target = (*target)->head; 696 *target = (*target)->head;
697
696 if ((*hitter)->head) 698 if ((*hitter)->head)
697 *hitter = (*hitter)->head; 699 *hitter = (*hitter)->head;
700
698 if ((*hitter)->env != NULL || (*target)->env != NULL) 701 if ((*hitter)->env != NULL || (*target)->env != NULL)
699 { 702 {
700 *simple_attack = 1; 703 *simple_attack = 1;
701 return 0; 704 return 0;
702 } 705 }
706
703 if (QUERY_FLAG (*target, FLAG_REMOVED) 707 if (QUERY_FLAG (*target, FLAG_REMOVED)
704 || QUERY_FLAG (*hitter, FLAG_REMOVED) || (*hitter)->map == NULL || !on_same_map ((*hitter), (*target))) 708 || QUERY_FLAG (*hitter, FLAG_REMOVED)
709 || !(*hitter)->map
710 || !on_same_map (*hitter, *target))
705 { 711 {
706 LOG (llevError, "BUG: hitter (arch %s, name %s) with no relation to " "target\n", &(*hitter)->arch->archname, &(*hitter)->name); 712 LOG (llevError | logBacktrace, "BUG: hitter (%s) with no relation to target (%s)\n",
713 (*hitter)->debug_desc (), (*target)->debug_desc ());
707 return 1; 714 return 1;
708 } 715 }
716
709 *simple_attack = 0; 717 *simple_attack = 0;
710 return 0; 718 return 0;
711} 719}
712 720
713static int 721static int
1958 return maxdam; 1966 return maxdam;
1959 } 1967 }
1960 1968
1961 op->remove (); 1969 op->remove ();
1962 1970
1963 for (i = 0; i < NROFNEWOBJS (op); i++) 1971 for (i = 0; i < op->stats.food; i++)
1964 { /* This doesn't handle op->more yet */ 1972 { /* This doesn't handle op->more yet */
1965 object *tmp = arch_to_object (op->other_arch); 1973 object *tmp = arch_to_object (op->other_arch);
1966 int j; 1974 int j;
1967 1975
1968 tmp->stats.hp = op->stats.hp; 1976 tmp->stats.hp = op->stats.hp;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines