--- deliantra/server/common/object.C 2007/07/10 07:31:19 1.165 +++ deliantra/server/common/object.C 2007/08/01 01:07:42 1.169 @@ -301,14 +301,14 @@ return 0; } - //TODO: generate an event or call into perl for additional checks if (ob1->self || ob2->self) { ob1->optimise (); ob2->optimise (); if (ob1->self || ob2->self) - return 0; + if (!cfperl_can_merge (ob1, ob2)) + return 0; } /* Everything passes, must be OK. */ @@ -962,6 +962,8 @@ if (destroy_inventory) destroy_inv (false); + play_sound (sound_die); + attachable::destroy (); } @@ -1377,7 +1379,6 @@ top = last->below; } } /* If objects on this space */ - if (flag & INS_MAP_LOAD) top = ms.top; @@ -2731,4 +2732,9 @@ insert (force); } - +void +object::play_sound (faceidx sound) const +{ + if (map) + map->play_sound (sound, x, y); +}