--- deliantra/server/common/object.C 2006/08/13 17:16:00 1.1 +++ deliantra/server/common/object.C 2006/08/25 17:11:52 1.2 @@ -1,6 +1,6 @@ /* * static char *rcsid_object_c = - * "$Id: object.C,v 1.1 2006/08/13 17:16:00 elmex Exp $"; + * "$Id: object.C,v 1.2 2006/08/25 17:11:52 root Exp $"; */ /* @@ -584,6 +584,9 @@ void clear_object(object *op) { + if (object_free_callback) + object_free_callback (op); + event *evt; event *evt2; @@ -663,6 +666,12 @@ int is_freed=QUERY_FLAG(op,FLAG_FREED),is_removed=QUERY_FLAG(op,FLAG_REMOVED); event *evt, *evt2, *evt_new; + if (object_free_callback) + object_free_callback (op); + + // callback registries and self are empty for copied objects + // this ought to change in the future + /* Decrement the refcounts, but don't bother zeroing the fields; they'll be overwritten by memcpy. */ if(op->name!=NULL) free_string(op->name); @@ -756,7 +765,7 @@ } } } - + update_ob_speed(op); }