--- deliantra/server/common/object.C 2006/09/14 01:19:47 1.42 +++ deliantra/server/common/object.C 2006/09/14 17:29:27 1.44 @@ -517,27 +517,6 @@ } /* - * Returns the object which this object marks as being the owner. - * A id-scheme is used to avoid pointing to objects which have been - * freed and are now reused. If this is detected, the owner is - * set to NULL, and NULL is returned. - * Changed 2004-02-12 - if the player is setting at the play again - * prompt, he is removed, and we don't want to treat him as an owner of - * anything, so check removed flag. I don't expect that this should break - * anything - once an object is removed, it is basically dead anyways. - */ -object * -object::get_owner () -{ - if (!owner - || QUERY_FLAG (owner, FLAG_FREED) - || QUERY_FLAG (owner, FLAG_REMOVED)) - owner = 0; - - return owner; -} - -/* * Sets the owner and sets the skill and exp pointers to owner's current * skill and experience objects. */ @@ -614,7 +593,6 @@ expmul = 1.0; face = blank_face; - attacked_by_count = -1; if (settings.casting_time) casting_time = -1; @@ -947,7 +925,6 @@ expmul = 1.0; face = blank_face; - attacked_by_count = -1; } object::~object () @@ -1063,7 +1040,10 @@ } } - owner = 0; + // clear those pointers that likely might have circular references to us + owner = 0; + enemy = 0; + attacked_by = 0; /* Remove object from the active list */ speed = 0;