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.93 by root, Tue Dec 26 20:04:09 2006 UTC vs.
Revision 1.95 by root, Wed Dec 27 05:42:08 2006 UTC

785 * object.c ? 785 * object.c ?
786 */ 786 */
787void 787void
788object::destroy_inv (bool drop_to_ground) 788object::destroy_inv (bool drop_to_ground)
789{ 789{
790 // need to check first, because the checks below might segfault
791 // as we might be on an invalid mapspace and crossfire code
792 // is too buggy to ensure that the inventory is empty.
793 // corollary: if you create arrows etc. with stuff in tis inventory,
794 // cf will crash below with off-map x and y
795 if (!inv)
796 return;
797
790 /* Only if the space blocks everything do we not process - 798 /* Only if the space blocks everything do we not process -
791 * if some form of movement is allowed, let objects 799 * if some form of movement is allowed, let objects
792 * drop on that space. 800 * drop on that space.
793 */ 801 */
794 if (!drop_to_ground 802 if (!drop_to_ground
795 || !map 803 || !map
796 || map->in_memory != MAP_IN_MEMORY 804 || map->in_memory != MAP_IN_MEMORY
797 || map->at (x, y).move_block == MOVE_ALL) 805 || ms ().move_block == MOVE_ALL)
798 { 806 {
799 while (inv) 807 while (inv)
800 { 808 {
801 inv->destroy_inv (drop_to_ground); 809 inv->destroy_inv (drop_to_ground);
802 inv->destroy (); 810 inv->destroy ();

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines