--- deliantra/server/common/object.C 2010/03/20 00:42:08 1.312 +++ deliantra/server/common/object.C 2010/03/26 00:05:45 1.313 @@ -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; +} +