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.168 by root, Thu Jul 26 00:27:07 2007 UTC vs.
Revision 1.174 by root, Wed Aug 8 04:52:59 2007 UTC

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 ())
966 if (sound_destroy)
967 play_sound (sound_destroy);
968 else if (flag [FLAG_MONSTER])
969 play_sound (sound_find ("monster_destroy")); // quick hack, too lazy to create a generic mechanism
970
965 attachable::destroy (); 971 attachable::destroy ();
966} 972}
967 973
968/* 974/*
969 * sub_weight() recursively (outwards) subtracts a number from the 975 * sub_weight() recursively (outwards) subtracts a number from the
1089 { 1095 {
1090 /* 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
1091 * being removed. 1097 * being removed.
1092 */ 1098 */
1093 1099
1094 if (tmp->type == PLAYER && tmp != this) 1100 if (tmp->type == PLAYER && tmp->container == this)
1095 {
1096 /* If a container that the player is currently using somehow gets 1101 /* If a container that the player is currently using somehow gets
1097 * removed (most likely destroyed), update the player view 1102 * removed (most likely destroyed), update the player view
1098 * appropriately. 1103 * appropriately.
1099 */ 1104 */
1100 if (tmp->container == this)
1101 {
1102 flag [FLAG_APPLIED] = 0;
1103 tmp->container = 0; 1105 tmp->close_container ();
1104 }
1105
1106 if (tmp->contr->ns)
1107 tmp->contr->ns->floorbox_update ();
1108 }
1109 1106
1110 /* See if object moving off should effect something */ 1107 /* See if object moving off should effect something */
1111 if (check_walk_off 1108 if (check_walk_off
1112 && ((move_type & tmp->move_off) 1109 && ((move_type & tmp->move_off)
1113 && (move_type & ~tmp->move_off & ~tmp->move_block) == 0)) 1110 && (move_type & ~tmp->move_off & ~tmp->move_block) == 0))
2728 force->flag [FLAG_APPLIED] = true; 2725 force->flag [FLAG_APPLIED] = true;
2729 2726
2730 insert (force); 2727 insert (force);
2731} 2728}
2732 2729
2733void
2734object::play_sound (faceidx sound) const
2735{
2736 if (map)
2737 map->play_sound (sound, x, y);
2738}

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines