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.169 by root, Wed Aug 1 01:07:42 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)
965 play_sound (sound_die); 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
966 970
967 attachable::destroy (); 971 attachable::destroy ();
968} 972}
969 973
970/* 974/*
1091 { 1095 {
1092 /* 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
1093 * being removed. 1097 * being removed.
1094 */ 1098 */
1095 1099
1096 if (tmp->type == PLAYER && tmp != this) 1100 if (tmp->type == PLAYER && tmp->container == this)
1097 {
1098 /* If a container that the player is currently using somehow gets 1101 /* If a container that the player is currently using somehow gets
1099 * removed (most likely destroyed), update the player view 1102 * removed (most likely destroyed), update the player view
1100 * appropriately. 1103 * appropriately.
1101 */ 1104 */
1102 if (tmp->container == this)
1103 {
1104 flag [FLAG_APPLIED] = 0;
1105 tmp->container = 0; 1105 tmp->close_container ();
1106 }
1107
1108 if (tmp->contr->ns)
1109 tmp->contr->ns->floorbox_update ();
1110 }
1111 1106
1112 /* See if object moving off should effect something */ 1107 /* See if object moving off should effect something */
1113 if (check_walk_off 1108 if (check_walk_off
1114 && ((move_type & tmp->move_off) 1109 && ((move_type & tmp->move_off)
1115 && (move_type & ~tmp->move_off & ~tmp->move_block) == 0)) 1110 && (move_type & ~tmp->move_off & ~tmp->move_block) == 0))
2730 force->flag [FLAG_APPLIED] = true; 2725 force->flag [FLAG_APPLIED] = true;
2731 2726
2732 insert (force); 2727 insert (force);
2733} 2728}
2734 2729
2735void
2736object::play_sound (faceidx sound) const
2737{
2738 if (map)
2739 map->play_sound (sound, x, y);
2740}

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines