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

Comparing deliantra/server/common/button.C (file contents):
Revision 1.12 by root, Sun Oct 15 02:16:34 2006 UTC vs.
Revision 1.14 by root, Wed Dec 13 03:28:42 2006 UTC

771 tmp->attack_movement = 0; 771 tmp->attack_movement = 0;
772 /* lots of checks here, but want to make sure we don't 772 /* lots of checks here, but want to make sure we don't
773 * dereference a null value 773 * dereference a null value
774 */ 774 */
775 if (tmp->type == GOLEM && tmp->owner && tmp->owner->type == PLAYER && tmp->owner->contr->ranges[range_golem] == tmp) 775 if (tmp->type == GOLEM && tmp->owner && tmp->owner->type == PLAYER && tmp->owner->contr->ranges[range_golem] == tmp)
776 {
777 tmp->owner->contr->ranges[range_golem] = NULL; 776 tmp->owner->contr->ranges[range_golem] = 0;
778 tmp->owner->contr->golem_count = 0; 777
779 }
780 tmp->owner = 0; 778 tmp->owner = 0;
781 } 779 }
782 break; 780 break;
783 case 1: /* angry -- get neutral monsters mad */ 781 case 1: /* angry -- get neutral monsters mad */
784 if (QUERY_FLAG (tmp, FLAG_UNAGGRESSIVE) && !QUERY_FLAG (tmp, FLAG_FRIENDLY)) 782 if (QUERY_FLAG (tmp, FLAG_UNAGGRESSIVE) && !QUERY_FLAG (tmp, FLAG_FRIENDLY))
801 if (tmp2->above == NULL) 799 if (tmp2->above == NULL)
802 break; 800 break;
803 801
804 if (tmp2->type != PLAYER) 802 if (tmp2->type != PLAYER)
805 break; 803 break;
806 set_owner (tmp, tmp2); 804 tmp->set_owner (tmp2);
807 SET_FLAG (tmp, FLAG_MONSTER); 805 SET_FLAG (tmp, FLAG_MONSTER);
808 tmp->stats.exp = 0; 806 tmp->stats.exp = 0;
809 SET_FLAG (tmp, FLAG_FRIENDLY); 807 SET_FLAG (tmp, FLAG_FRIENDLY);
810 add_friendly_object (tmp); 808 add_friendly_object (tmp);
811 tmp->attack_movement = PETMOVE; 809 tmp->attack_movement = PETMOVE;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines