--- deliantra/server/common/object.C 2007/08/01 01:07:42 1.169 +++ deliantra/server/common/object.C 2007/08/08 04:52:59 1.174 @@ -962,7 +962,11 @@ if (destroy_inventory) destroy_inv (false); - play_sound (sound_die); + if (is_head ()) + if (sound_destroy) + play_sound (sound_destroy); + else if (flag [FLAG_MONSTER]) + play_sound (sound_find ("monster_destroy")); // quick hack, too lazy to create a generic mechanism attachable::destroy (); } @@ -1093,21 +1097,12 @@ * being removed. */ - if (tmp->type == PLAYER && tmp != this) - { - /* If a container that the player is currently using somehow gets - * removed (most likely destroyed), update the player view - * appropriately. - */ - if (tmp->container == this) - { - flag [FLAG_APPLIED] = 0; - tmp->container = 0; - } - - if (tmp->contr->ns) - tmp->contr->ns->floorbox_update (); - } + if (tmp->type == PLAYER && tmp->container == this) + /* If a container that the player is currently using somehow gets + * removed (most likely destroyed), update the player view + * appropriately. + */ + tmp->close_container (); /* See if object moving off should effect something */ if (check_walk_off @@ -2732,9 +2727,3 @@ insert (force); } -void -object::play_sound (faceidx sound) const -{ - if (map) - map->play_sound (sound, x, y); -}