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.56 by root, Sun Dec 3 02:04:57 2006 UTC vs.
Revision 1.57 by root, Sun Dec 3 02:46:33 2006 UTC

919 if (!QUERY_FLAG (this, FLAG_REMOVED)) 919 if (!QUERY_FLAG (this, FLAG_REMOVED))
920 remove_ob (this); 920 remove_ob (this);
921 921
922 SET_FLAG (this, FLAG_FREED); 922 SET_FLAG (this, FLAG_FREED);
923 923
924 // hack to ensure that freed objects still have a valid map
925 {
926 static maptile *freed_map; // freed objects are moved here to avoid crashes
927
928 if (!freed_map)
929 {
930 freed_map = new maptile;
931
932 freed_map->name = "/internal/freed_objects_map";
933 freed_map->width = 3;
934 freed_map->height = 3;
935
936 freed_map->allocate ();
937 }
938
939 map = freed_map;
940 x = 1;
941 y = 1;
942 }
943
944 if (more) 924 if (more)
945 { 925 {
946 more->destroy (destroy_inventory); 926 more->destroy (destroy_inventory);
947 more = 0; 927 more = 0;
948 } 928 }
986 966
987 op = tmp; 967 op = tmp;
988 } 968 }
989 } 969 }
990 } 970 }
971
972 // hack to ensure that freed objects still have a valid map
973 {
974 static maptile *freed_map; // freed objects are moved here to avoid crashes
975
976 if (!freed_map)
977 {
978 freed_map = new maptile;
979
980 freed_map->name = "/internal/freed_objects_map";
981 freed_map->width = 3;
982 freed_map->height = 3;
983
984 freed_map->allocate ();
985 }
986
987 map = freed_map;
988 x = 1;
989 y = 1;
990 }
991 991
992 // clear those pointers that likely might have circular references to us 992 // clear those pointers that likely might have circular references to us
993 owner = 0; 993 owner = 0;
994 enemy = 0; 994 enemy = 0;
995 attacked_by = 0; 995 attacked_by = 0;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines