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.159 by root, Mon Jun 4 13:04:00 2007 UTC vs.
Revision 1.162 by root, Sat Jun 16 00:12:20 2007 UTC

937 map = freed_map; 937 map = freed_map;
938 x = 1; 938 x = 1;
939 y = 1; 939 y = 1;
940 } 940 }
941 941
942 head = 0;
943
944 if (more) 942 if (more)
945 { 943 {
946 more->destroy (); 944 more->destroy ();
947 more = 0; 945 more = 0;
948 } 946 }
949 947
948 head = 0;
949
950 // clear those pointers that likely might have circular references to us 950 // clear those pointers that likely might cause circular references
951 owner = 0; 951 owner = 0;
952 enemy = 0; 952 enemy = 0;
953 attacked_by = 0; 953 attacked_by = 0;
954 current_weapon = 0;
954} 955}
955 956
956void 957void
957object::destroy (bool destroy_inventory) 958object::destroy (bool destroy_inventory)
958{ 959{
1116 1117
1117 if (destroyed ()) 1118 if (destroyed ())
1118 LOG (llevError, "BUG: remove_ob(): name %s, destroyed leaving object\n", tmp->debug_desc ()); 1119 LOG (llevError, "BUG: remove_ob(): name %s, destroyed leaving object\n", tmp->debug_desc ());
1119 } 1120 }
1120 1121
1121 /* Eneq(@csd.uu.se): Fixed this to skip tmp->above=tmp */
1122 //TODO: why is this horrible hacka fix? get rid of this code=bug! (schmorp)
1123 if (tmp->above == tmp)
1124 tmp->above = 0;
1125
1126 last = tmp; 1122 last = tmp;
1127 } 1123 }
1128 1124
1129 /* last == NULL if there are no objects on this space */ 1125 /* last == NULL if there are no objects on this space */
1130 //TODO: this makes little sense, why only update the topmost object? 1126 //TODO: this makes little sense, why only update the topmost object?
1181 if (more) 1177 if (more)
1182 return; 1178 return;
1183 1179
1184 object *prev = this; 1180 object *prev = this;
1185 1181
1186 for (archetype *at = arch->more; at; at = at->more) 1182 for (archetype *at = (archetype *)arch->more; at; at = (archetype *)at->more)
1187 { 1183 {
1188 object *op = arch_to_object (at); 1184 object *op = arch_to_object (at);
1189 1185
1190 op->name = name; 1186 op->name = name;
1191 op->name_pl = name_pl; 1187 op->name_pl = name_pl;
2574 } 2570 }
2575 else 2571 else
2576 item = item->env; 2572 item = item->env;
2577} 2573}
2578 2574
2579
2580const char * 2575const char *
2581object::flag_desc (char *desc, int len) const 2576object::flag_desc (char *desc, int len) const
2582{ 2577{
2583 char *p = desc; 2578 char *p = desc;
2584 bool first = true; 2579 bool first = true;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines