… | |
… | |
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 | |
956 | void |
957 | void |
957 | object::destroy (bool destroy_inventory) |
958 | object::destroy (bool destroy_inventory) |
958 | { |
959 | { |
… | |
… | |
1115 | move_apply (tmp, this, 0); |
1116 | move_apply (tmp, this, 0); |
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 | /* 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 | |
1121 | |
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 */ |
… | |
… | |
2574 | } |
2570 | } |
2575 | else |
2571 | else |
2576 | item = item->env; |
2572 | item = item->env; |
2577 | } |
2573 | } |
2578 | |
2574 | |
2579 | |
|
|
2580 | const char * |
2575 | const char * |
2581 | object::flag_desc (char *desc, int len) const |
2576 | object::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; |