--- deliantra/server/server/move.C 2010/02/07 04:22:33 1.36 +++ deliantra/server/server/move.C 2010/03/26 00:59:22 1.38 @@ -2,8 +2,8 @@ * This file is part of Deliantra, the Roguelike Realtime MMORPG. * * Copyright (©) 2005,2006,2007,2008 Marc Alexander Lehmann / Robin Redeker / the Deliantra team - * Copyright (©) 2002,2007 Mark Wedel & Crossfire Development Team - * Copyright (©) 1992,2007 Frank Tore Johansen + * Copyright (©) 2002 Mark Wedel & Crossfire Development Team + * Copyright (©) 1992 Frank Tore Johansen * * Deliantra is free software: you can redistribute it and/or modify it under * the terms of the Affero GNU General Public License as published by the @@ -27,34 +27,6 @@ # include #endif -/* - * move_object() tries to move object op in the direction "dir". - * If it fails (something blocks the passage), it returns 0, - * otherwise 1. - * This is an improvement from the previous move_ob(), which - * removed and inserted objects even if they were unable to move. - */ -int -move_object (object *op, int dir) -{ - return op->move (dir); -} - -/* 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 - * move (originator is pushing op) - * returns 0 if the object is not able to move to the - * desired space, 1 otherwise (in which case we also - * move the object accordingly. This function is - * very similiar to move_object. - */ -int -move_ob (object *op, int dir, object *originator) -{ - return op->move (dir, originator); -} - int object::move (int dir, object *originator) { @@ -355,7 +327,7 @@ return; } - move_ob (pusher, dir, pusher); + pusher->move (dir); new_draw_info_format (NDI_BLACK, 0, pusher, "You move the %s.", query_name (op)); return; } @@ -440,7 +412,7 @@ str2 = (pusher->stats.Str > 0 ? pusher->stats.Str : pusher->level); if (QUERY_FLAG (who, FLAG_WIZ) || random_roll (str1, str1 * 5 / 2, who, PREFER_HIGH) >= - random_roll (str2, str2 * 5 / 2, pusher, PREFER_HIGH) || !move_object (who, dir)) + random_roll (str2, str2 * 5 / 2, pusher, PREFER_HIGH) || !who->move (dir)) { if (who->type == PLAYER) new_draw_info_format (NDI_UNIQUE, 0, who, "%s tried to push you.", &pusher->name);