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

Comparing deliantra/server/common/object.c (file contents):
Revision 1.1 by root, Fri Feb 3 07:11:38 2006 UTC vs.
Revision 1.2 by root, Tue Feb 7 23:29:55 2006 UTC

1/* 1/*
2 * static char *rcsid_object_c = 2 * static char *rcsid_object_c =
3 * "$Id: object.c,v 1.1 2006/02/03 07:11:38 root Exp $"; 3 * "$Id: object.c,v 1.2 2006/02/07 23:29:55 root Exp $";
4 */ 4 */
5 5
6/* 6/*
7 CrossFire, A Multiplayer game for X-windows 7 CrossFire, A Multiplayer game for X-windows
8 8
52 52
53object *objects; /* Pointer to the list of used objects */ 53object *objects; /* Pointer to the list of used objects */
54object *free_objects; /* Pointer to the list of unused objects */ 54object *free_objects; /* Pointer to the list of unused objects */
55object *active_objects; /* List of active objects that need to be processed */ 55object *active_objects; /* List of active objects that need to be processed */
56 56
57void (*object_free_callback)(object *ob);
57 58
58short freearr_x[SIZEOFFREE]= 59short freearr_x[SIZEOFFREE]=
59 {0,0,1,1,1,0,-1,-1,-1,0,1,2,2,2,2,2,1,0,-1,-2,-2,-2,-2,-2,-1, 60 {0,0,1,1,1,0,-1,-1,-1,0,1,2,2,2,2,2,1,0,-1,-2,-2,-2,-2,-2,-1,
60 0,1,2,3,3,3,3,3,3,3,2,1,0,-1,-2,-3,-3,-3,-3,-3,-3,-3,-2,-1}; 61 0,1,2,3,3,3,3,3,3,3,2,1,0,-1,-2,-3,-3,-3,-3,-3,-3,-3,-2,-1};
61short freearr_y[SIZEOFFREE]= 62short freearr_y[SIZEOFFREE]=
1060void free_object(object *ob) { 1061void free_object(object *ob) {
1061 free_object2(ob, 0); 1062 free_object2(ob, 0);
1062} 1063}
1063void free_object2(object *ob, int free_inventory) { 1064void free_object2(object *ob, int free_inventory) {
1064 object *tmp,*op; 1065 object *tmp,*op;
1066
1067 if (object_free_callback)
1068 object_free_callback (ob);
1065 1069
1066 if (!QUERY_FLAG(ob,FLAG_REMOVED)) { 1070 if (!QUERY_FLAG(ob,FLAG_REMOVED)) {
1067 LOG(llevDebug,"Free object called with non removed object\n"); 1071 LOG(llevDebug,"Free object called with non removed object\n");
1068 dump_object(ob); 1072 dump_object(ob);
1069#ifdef MANY_CORES 1073#ifdef MANY_CORES

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines