… | |
… | |
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) || (*hitter)->map == NULL || !on_same_map ((*hitter), (*target))) |
705 | { |
709 | { |
706 | LOG (llevError, "BUG: hitter (arch %s, name %s) with no relation to " "target\n", &(*hitter)->arch->archname, &(*hitter)->name); |
710 | LOG (llevError | logBacktrace, "BUG: hitter (%s) with no relation to target (%s)\n", |
|
|
711 | (*hitter)->debug_desc (), (*target)->debug_desc ()); |
707 | return 1; |
712 | return 1; |
708 | } |
713 | } |
|
|
714 | |
709 | *simple_attack = 0; |
715 | *simple_attack = 0; |
710 | return 0; |
716 | return 0; |
711 | } |
717 | } |
712 | |
718 | |
713 | static int |
719 | static int |