Man on rocks gets hit by waves and swept into ocean