… | |
… | |
960 | return; |
960 | return; |
961 | |
961 | |
962 | if (destroy_inventory) |
962 | if (destroy_inventory) |
963 | destroy_inv (false); |
963 | destroy_inv (false); |
964 | |
964 | |
|
|
965 | if (is_head ()) |
965 | if (sound_destroy) |
966 | if (sound_destroy) |
966 | play_sound (sound_destroy); |
967 | play_sound (sound_destroy); |
967 | else if (flag [FLAG_MONSTER]) |
968 | else if (flag [FLAG_MONSTER]) |
968 | play_sound (sound_find ("monster_destroy")); // quick hack, too lazy to create a generic mechanism |
969 | play_sound (sound_find ("monster_destroy")); // quick hack, too lazy to create a generic mechanism |
969 | |
970 | |
970 | attachable::destroy (); |
971 | attachable::destroy (); |
971 | } |
972 | } |
972 | |
973 | |
973 | /* |
974 | /* |
… | |
… | |
1094 | { |
1095 | { |
1095 | /* No point updating the players look faces if he is the object |
1096 | /* No point updating the players look faces if he is the object |
1096 | * being removed. |
1097 | * being removed. |
1097 | */ |
1098 | */ |
1098 | |
1099 | |
1099 | if (tmp->type == PLAYER && tmp != this) |
1100 | if (tmp->type == PLAYER && tmp->container == this) |
1100 | { |
|
|
1101 | /* If a container that the player is currently using somehow gets |
1101 | /* If a container that the player is currently using somehow gets |
1102 | * removed (most likely destroyed), update the player view |
1102 | * removed (most likely destroyed), update the player view |
1103 | * appropriately. |
1103 | * appropriately. |
1104 | */ |
1104 | */ |
1105 | if (tmp->container == this) |
|
|
1106 | { |
|
|
1107 | flag [FLAG_APPLIED] = 0; |
|
|
1108 | tmp->container = 0; |
1105 | tmp->close_container (); |
1109 | } |
|
|
1110 | |
|
|
1111 | if (tmp->contr->ns) |
|
|
1112 | tmp->contr->ns->floorbox_update (); |
|
|
1113 | } |
|
|
1114 | |
1106 | |
1115 | /* See if object moving off should effect something */ |
1107 | /* See if object moving off should effect something */ |
1116 | if (check_walk_off |
1108 | if (check_walk_off |
1117 | && ((move_type & tmp->move_off) |
1109 | && ((move_type & tmp->move_off) |
1118 | && (move_type & ~tmp->move_off & ~tmp->move_block) == 0)) |
1110 | && (move_type & ~tmp->move_off & ~tmp->move_block) == 0)) |