--- deliantra/server/common/treasure.C 2007/04/19 16:23:46 1.50 +++ deliantra/server/common/treasure.C 2007/04/19 16:36:00 1.51 @@ -232,8 +232,6 @@ static void put_treasure (object *op, object *creator, int flags) { - object *tmp; - /* Bit of a hack - spells should never be put onto the map. The entire * treasure stuff is a problem - there is no clear idea of knowing * this is the original object, or if this is an object that should be created @@ -241,8 +239,13 @@ */ if (flags & GT_ENVIRONMENT && op->type != SPELL) { - SET_FLAG (op, FLAG_OBJ_ORIGINAL); - op->insert_at (creator, creator, INS_NO_MERGE | INS_NO_WALK_ON); + if (ob_blocked (op, creator->map, creator->x, creator->y)) + op->destroy (); + else + { + SET_FLAG (op, FLAG_OBJ_ORIGINAL); + op->insert_at (creator, creator, INS_NO_MERGE | INS_NO_WALK_ON); + } } else { @@ -251,8 +254,9 @@ if ((flags & GT_APPLY) && QUERY_FLAG (creator, FLAG_MONSTER)) monster_check_apply (creator, op); - if ((flags & GT_UPDATE_INV) && (tmp = creator->in_player ())) - esrv_send_item (tmp, op); + if (flags & GT_UPDATE_INV) + if (object *tmp = creator->in_player ()) + esrv_send_item (tmp, op); } }