--- deliantra/server/common/object.C 2010/03/20 00:42:08 1.312 +++ deliantra/server/common/object.C 2010/03/26 21:43:43 1.315 @@ -2,8 +2,8 @@ * This file is part of Deliantra, the Roguelike Realtime MMORPG. * * Copyright (©) 2005,2006,2007,2008,2009,2010 Marc Alexander Lehmann / Robin Redeker / the Deliantra team - * Copyright (©) 2001,2007 Mark Wedel & Crossfire Development Team - * Copyright (©) 1992,2007 Frank Tore Johansen + * Copyright (©) 2001 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 @@ -624,7 +624,7 @@ "You try to balance all your items at once, " "but the %s is just too much for your body. " "[You need to unapply some items first - use the 'body' command to see " - "how many items you cna wera on a specific body part.]", &ob->name); + "how many items you can wear on a specific body part.]", &ob->name); return false; } @@ -1333,7 +1333,7 @@ * * Return value: * new object if 'op' was merged with other object - * NULL if 'op' was destroyed + * NULL if there was an error (destroyed, blocked etc.) * just 'op' otherwise */ object * @@ -2695,3 +2695,19 @@ } } +void object::change_move_type (MoveType mt) +{ + if (move_type == mt) + return; + + if (is_on_map ()) + { + // we are on the map, so handle move_on/off effects + remove (); + move_type = mt; + map->insert (this, x, y, this); + } + else + move_type = mt; +} +