… | |
… | |
918 | |
918 | |
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 | |
|
|
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 = get_empty_map (3, 3); |
|
|
931 | freed_map->name = "freed objects map"; |
|
|
932 | allocate_map (freed_map); |
|
|
933 | } |
|
|
934 | |
|
|
935 | map = freed_map; |
|
|
936 | x = 1; |
|
|
937 | y = 1; |
|
|
938 | } |
923 | |
939 | |
924 | if (more) |
940 | if (more) |
925 | { |
941 | { |
926 | more->destroy (destroy_inventory); |
942 | more->destroy (destroy_inventory); |
927 | more = 0; |
943 | more = 0; |