--- deliantra/server/socket/item.C 2006/08/13 17:16:06 1.1 +++ deliantra/server/socket/item.C 2006/08/29 07:34:01 1.2 @@ -1,7 +1,7 @@ /* * static char *rcsid_item_c = - * "$Id: item.C,v 1.1 2006/08/13 17:16:06 elmex Exp $"; + * "$Id: item.C,v 1.2 2006/08/29 07:34:01 root Exp $"; */ /* @@ -221,10 +221,7 @@ pl->map->in_memory != MAP_IN_MEMORY || out_of_map(pl->map,pl->x,pl->y)) return; - if (pl->contr->transport) - for (tmp=pl->contr->transport->inv; tmp && tmp->above;tmp=tmp->above) ; - else - for (tmp=get_map_ob(pl->map,pl->x,pl->y); tmp && tmp->above;tmp=tmp->above) ; + for (tmp=get_map_ob(pl->map,pl->x,pl->y); tmp && tmp->above;tmp=tmp->above) ; sl.buf= (unsigned char *) malloc(MAXSOCKBUF); @@ -251,11 +248,6 @@ SockList_AddShort(&sl, 0); } - if (pl->contr->transport) { - add_object_to_socklist(&pl->contr->socket, &sl, pl->contr->transport); - got_one++; - } - for (last=NULL; tmp!=last; tmp=tmp->below) { object *head; @@ -402,11 +394,6 @@ if (flags & UPD_WEIGHT) { sint32 weight = WEIGHT(op); - /* TRANSPORTS are odd - they sort of look like containers, yet can't be - * picked up. So we don't to send the weight, as it is odd that you see - * weight sometimes and not other (the draw_look won't send it - * for example. - */ SockList_AddInt(&sl, QUERY_FLAG(op, FLAG_NO_PICK) ? -1 : weight); if (pl == op) { op->contr->last_weight = weight; @@ -559,11 +546,6 @@ if (tmp->count == count) return tmp; - if (pl->contr->transport) { - for(tmp = pl->contr->transport->inv; tmp; tmp = tmp->below) - if (tmp->count == count) - return tmp; - } return NULL; } @@ -739,10 +721,7 @@ return; } - /* If on a transport, you don't drop to the ground - you drop to the - * transport. - */ - if (!to && !pl->contr->transport) { /* drop it to the ground */ + if (!to) { /* drop it to the ground */ /* LOG(llevDebug, "Drop it on the ground.\n");*/ if (op->map && !op->env) { @@ -772,28 +751,21 @@ pick_up(pl, op); return ; } - /* If not dropped or picked up, we are putting it into a sack */ - if (pl->contr->transport) { - if (can_pick(pl, op) && transport_can_hold(pl->contr->transport, op, nrof)) { - put_object_in_sack (pl, pl->contr->transport, op, nrof); - } - } else { - env = esrv_get_ob_from_count(pl, to); - if (!env) { - LOG(llevDebug, - "Player '%s' tried to move object to the unknown location (%d)\n", - pl->name, to); - return; - } - /* put_object_in_sack presumes that necessary sanity checking - * has already been done (eg, it can be picked up and fits in - * in a sack, so check for those things. We should also check - * an make sure env is in fact a container for that matter. - */ - if (env->type == CONTAINER - && can_pick(pl, op) && sack_can_hold(pl, env, op, nrof)) { - put_object_in_sack (pl, env, op, nrof); - } + env = esrv_get_ob_from_count(pl, to); + if (!env) { + LOG(llevDebug, + "Player '%s' tried to move object to the unknown location (%d)\n", + pl->name, to); + return; + } + /* put_object_in_sack presumes that necessary sanity checking + * has already been done (eg, it can be picked up and fits in + * in a sack, so check for those things. We should also check + * an make sure env is in fact a container for that matter. + */ + if (env->type == CONTAINER + && can_pick(pl, op) && sack_can_hold(pl, env, op, nrof)) { + put_object_in_sack (pl, env, op, nrof); } }