public void TeleportTo(Map map, ref Vector3 pos, float? orientation, bool wait) { if (!HasNode) { m_Map = null; } Assert.IsNotNull(map); if (Map == map) { Assert.IsTrue(Map.MoveObject(this, ref pos)); if (orientation.HasValue) { Orientation = orientation.Value; } } else { map.TransferObject(this, pos, wait); if (orientation != null) { Orientation = orientation.Value; } LastPosition = pos; } }