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.277 by root, Thu Jan 1 11:41:17 2009 UTC vs.
Revision 1.280 by root, Thu Jan 8 19:23:44 2009 UTC

963 963
964void 964void
965object::do_destroy () 965object::do_destroy ()
966{ 966{
967 if (flag [FLAG_IS_LINKED]) 967 if (flag [FLAG_IS_LINKED])
968 remove_button_link (this); 968 remove_link ();
969 969
970 if (flag [FLAG_FRIENDLY]) 970 if (flag [FLAG_FRIENDLY])
971 remove_friendly_object (this); 971 remove_friendly_object (this);
972 972
973 remove (); 973 remove ();
2174 * This basically means that if direction is 15, then it could either go 2174 * This basically means that if direction is 15, then it could either go
2175 * direction 4, 14, or 16 to get back to where we are. 2175 * direction 4, 14, or 16 to get back to where we are.
2176 * Moved from spell_util.c to object.c with the other related direction 2176 * Moved from spell_util.c to object.c with the other related direction
2177 * functions. 2177 * functions.
2178 */ 2178 */
2179int reduction_dir[SIZEOFFREE][3] = { 2179const int reduction_dir[SIZEOFFREE][3] = {
2180 {0, 0, 0}, /* 0 */ 2180 {0, 0, 0}, /* 0 */
2181 {0, 0, 0}, /* 1 */ 2181 {0, 0, 0}, /* 1 */
2182 {0, 0, 0}, /* 2 */ 2182 {0, 0, 0}, /* 2 */
2183 {0, 0, 0}, /* 3 */ 2183 {0, 0, 0}, /* 3 */
2184 {0, 0, 0}, /* 4 */ 2184 {0, 0, 0}, /* 4 */
2563 2563
2564 return insert (force); 2564 return insert (force);
2565} 2565}
2566 2566
2567void 2567void
2568object::play_sound (faceidx sound) 2568object::play_sound (faceidx sound) const
2569{ 2569{
2570 if (!sound) 2570 if (!sound)
2571 return; 2571 return;
2572 2572
2573 if (flag [FLAG_REMOVED]) 2573 if (is_on_map ())
2574 return;
2575
2576 if (env)
2577 {
2578 if (object *pl = in_player ())
2579 pl->contr->play_sound (sound);
2580 }
2581 else
2582 map->play_sound (sound, x, y); 2574 map->play_sound (sound, x, y);
2575 else if (object *pl = in_player ())
2576 pl->contr->play_sound (sound);
2577}
2578
2579void
2580object::say_msg (const char *msg) const
2581{
2582 if (is_on_map ())
2583 map->say_msg (msg, x, y);
2584 else if (object *pl = in_player ())
2585 pl->contr->play_sound (sound);
2583} 2586}
2584 2587
2585void 2588void
2586object::make_noise () 2589object::make_noise ()
2587{ 2590{

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines