… | |
… | |
1025 | void |
1025 | void |
1026 | object::destroy (bool destroy_inventory) |
1026 | object::destroy (bool destroy_inventory) |
1027 | { |
1027 | { |
1028 | if (destroyed ()) |
1028 | if (destroyed ()) |
1029 | return; |
1029 | return; |
|
|
1030 | |
|
|
1031 | if (!is_head () && !head->destroyed ()) |
|
|
1032 | { |
|
|
1033 | LOG (llevError | logBacktrace, "tried to destroy the tail of an object"); |
|
|
1034 | head->destroy (destroy_inventory); |
|
|
1035 | } |
1030 | |
1036 | |
1031 | destroy_inv (!destroy_inventory); |
1037 | destroy_inv (!destroy_inventory); |
1032 | |
1038 | |
1033 | if (is_head ()) |
1039 | if (is_head ()) |
1034 | if (sound_destroy) |
1040 | if (sound_destroy) |