--- deliantra/server/server/move.C 2007/04/16 06:23:42 1.16 +++ deliantra/server/server/move.C 2007/06/04 13:04:00 1.20 @@ -1,25 +1,25 @@ /* - * CrossFire, A Multiplayer game for X-windows + * This file is part of Crossfire TRT, the Roguelike Realtime MORPG. * - * Copyright (C) 2005, 2006, 2007 Marc Lehmann & Crossfire+ Development Team - * Copyright (C) 2002 Mark Wedel & Crossfire Development Team - * Copyright (C) 1992 Frank Tore Johansen + * Copyright (©) 2005,2006,2007 Marc Alexander Lehmann / Robin Redeker / the Crossfire TRT team + * Copyright (©) 2002,2007 Mark Wedel & Crossfire Development Team + * Copyright (©) 1992,2007 Frank Tore Johansen * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. + * Crossfire TRT is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the Free + * Software Foundation; either version 2 of the License, or (at your option) + * any later version. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY + * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * for more details. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - * - * The author can be reached via e-mail to + * You should have received a copy of the GNU General Public License along + * with Crossfire TRT; if not, write to the Free Software Foundation, Inc. 51 + * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + * The authors can be reached via e-mail to */ #include @@ -27,11 +27,6 @@ # 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, @@ -46,7 +41,6 @@ return move_ob (op, dir, op); } - /* object op is trying to move in direction dir. * originator is typically the same as op, but * can be different if originator is causing op to @@ -188,8 +182,8 @@ op = op->head; op->remove (); for (tmp = op; tmp != NULL; tmp = tmp->more) - tmp->x = x + freearr_x[i] + (tmp->arch == NULL ? 0 : tmp->arch->clone.x), - tmp->y = y + freearr_y[i] + (tmp->arch == NULL ? 0 : tmp->arch->clone.y); + tmp->x = x + freearr_x[i] + (tmp->arch == NULL ? 0 : tmp->arch->x), + tmp->y = y + freearr_y[i] + (tmp->arch == NULL ? 0 : tmp->arch->y); tmp = insert_ob_in_map (op, op->map, originator, 0); if (tmp) @@ -294,8 +288,8 @@ /* Update location for the object */ for (tmp = user; tmp != NULL; tmp = tmp->more) { - tmp->x = other_teleporter->x + freearr_x[k] + (tmp->arch == NULL ? 0 : tmp->arch->clone.x); - tmp->y = other_teleporter->y + freearr_y[k] + (tmp->arch == NULL ? 0 : tmp->arch->clone.y); + tmp->x = other_teleporter->x + freearr_x[k] + (tmp->arch == NULL ? 0 : tmp->arch->x); + tmp->y = other_teleporter->y + freearr_y[k] + (tmp->arch == NULL ? 0 : tmp->arch->y); } tmp = insert_ob_in_map (user, other_teleporter->map, NULL, 0); return (tmp == NULL); @@ -430,11 +424,8 @@ /* player change place with his pets or summoned creature */ /* TODO: allow multi arch pushing. Can't be very difficult */ 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 + && ((owner && owner->contr && pusher->contr && same_party (owner->contr->party, pusher->contr->party)) + || owner == pusher) ) { int temp; @@ -494,13 +485,12 @@ str1 = (who->stats.Str > 0 ? who->stats.Str : who->level); str2 = (pusher->stats.Str > 0 ? pusher->stats.Str : pusher->level); if (QUERY_FLAG (who, FLAG_WIZ) || - random_roll (str1, str1 / 2 + str1 * 2, who, PREFER_HIGH) >= - random_roll (str2, str2 / 2 + str2 * 2, pusher, PREFER_HIGH) || !move_object (who, dir)) + random_roll (str1, str1 * 5 / 2, who, PREFER_HIGH) >= + random_roll (str2, str2 * 5 / 2, pusher, PREFER_HIGH) || !move_object (who, dir)) { if (who->type == PLAYER) - { - new_draw_info_format (NDI_UNIQUE, 0, who, "%s tried to push you.", &pusher->name); - } + new_draw_info_format (NDI_UNIQUE, 0, who, "%s tried to push you.", &pusher->name); + return 0; }