--- deliantra/server/server/move.c 2006/02/03 07:14:33 1.1 +++ deliantra/server/server/move.c 2006/02/22 18:53:56 1.4 @@ -31,6 +31,11 @@ #include #endif +#ifdef COZY_SERVER +// use a ptotoype +extern int same_party (partylist *a, partylist *b); +#endif + /* * move_object() tries to move object op in the direction "dir". * If it fails (something blocks the passage), it returns 0, @@ -125,9 +130,9 @@ * on edge of map, +=x, +=y doesn't make correct coordinates. */ for(tmp = op; tmp != NULL; tmp = tmp->more) { - tmp->x = newx + tmp->arch->clone.x; - tmp->y = newy + tmp->arch->clone.y; - tmp->map = m; + tmp->x += freearr_x[dir]; + tmp->y += freearr_y[dir]; + tmp->map = get_map_from_coord(tmp->map, &tmp->x, &tmp->y); } /* insert_ob_in_map will deal with any tiling issues */ @@ -139,6 +144,21 @@ op->contr->socket.update_look=1; op->contr->socket.look_position=0; } + else if (op->type == TRANSPORT) { + object *pl; + + for (pl=op->inv; pl; pl=pl->below) { + if (pl->type == PLAYER) { + pl->contr->do_los=1; + pl->map = op->map; + pl->x = op->x; + pl->y = op->y; + esrv_map_scroll(&pl->contr->socket, freearr_x[dir],freearr_y[dir]); + pl->contr->socket.update_look=1; + pl->contr->socket.look_position=0; + } + } + } return 1; /* this shouldn't be reached */ } @@ -397,7 +417,18 @@ /* player change place with his pets or summoned creature */ /* TODO: allow multi arch pushing. Can't be very difficult */ - if (who->more == NULL && owner == pusher) { + if (who->more == NULL +#ifdef COZY_SERVER + && + ( + (owner && owner->contr && pusher->contr + && same_party (owner->contr->party, pusher->contr->party)) + || owner == pusher + ) +#else + && owner == pusher +#endif + ) { int temp; mapstruct *m;